• Eugene Kosov's avatar
    speed up fil_validate() in debug builds · 17109001
    Eugene Kosov authored
    This function is very common in a debug build. I can even see it in
    profiler.
    
    This patch reduces execution time of fil_validate() from
    8948ns
    8367ns
    8650ns
    8906ns
    8448ns
    
    to
    260ns
    232ns
    403ns
    275ns
    169ns
    in my environment.
    
    The trick is a faster fil_space_t iteration. Hash table
    is typically initialized with a size of 50,000. And looping through
    it is slow. Slower, than iterating an exact amount of fil_space_t
    which is typically less than ten.
    
    Only debug builds are affected.
    17109001
fil0fil.cc 163 KB