• Kirill Smelkov's avatar
    lib/mem += memdelta · 84def52e
    Kirill Smelkov authored
    This is utility function that we will need to use in the next patch to
    see how data of two blocks are similar to each other.
    
    We use numpy for the implementation because this code will be hot and if we
    don't use optimized C routines writeout will become very slow.
    
    Quoting draft patch kirr/wendelin.core@3f631932 :
    
        -> Also optimize ndelta computation - when done in plain python just
           this part was taking a lot of time as timing for initial writeup
           showed:
    
             writeup with ZBlk0: ~20-25s
             writeup with ZBlk1: ~20-30s
             writeup with auto:  was ~ 120s
    
           now, after switching to numpy for ndelta computation, whole runtime
           with 'auto' is taking ~ 35s. The whole runtime, if I observe
           benchmark execution correctly, is dominated by database writeup.
    
    /reviewed-by @levin.zimmermann
    /reviewed-on !20
    84def52e
test_mem.py 1.44 KB