Optimizing Eq instances with reallyUnsafePtrEquality#
 
            
            
            
            
                8 Jun
                
                    2021
                
            
            
                8 Jun
                
                '21
                
            
            
            
        
    
                10:25 a.m.
            
        Hi everyone! In https://github.com/haskell-unordered-containers/unordered-containers/issues/... we're wondering whether certain Eq instances, for example record types or strings, could be optimized by including a pointer equality check that detects when an object is compared with itself. Does anyone here have experience with such an optimization? Has this been considered before, for example in GHC's deriving machinery? One complication seems to be the correct handling of fields with irreflexive instances, for example Float and Double. In such a case, pointer equality doesn't imply "==-equality". I'm looking forward to hearing your thoughts on this! :) Cheers, Simon
        1606
        
      
          Age (days ago)
        
      
        1606
        
    
          Last active (days ago)
        
        
        
        0 comments
    
    
        
        1 participants
    
    
    
    
    
    
    
    
    participants (1)
- 
                 Simon Jakobi Simon Jakobi