mirror of
https://github.com/Zenithsiz/ftmemsim-valgrind.git
synced 2026-02-12 22:24:53 +00:00
Scanning 1GB of random values made of 200_000 malloc-ed block is (on amd64) changing from (about) 17 seconds to (about) 10 seconds. On x86, it goes from 153 seconds to 129 seconds. (this huge difference between x86 and amd64 leak search time for this random test is because a random value has about one chance on 4 to be in the addressable memory on x86 and so the dichotomic search in the list of malloc-ed blocks is called for a lot more values than on amd64). Basically, there are 3 optimisations: 1. call MC_(is_within_valid_secondary) only at the beginning of a secondary map (and not for each Word). 2. call SETJMP only at the beginning of a page (and not for each Word) 3. Validate an aligned word using get_vabits8 rather than get_vabits2. Each of the above optimisation more or less improves by 2 seconds. (to go from 17 seconds to 10 seconds). git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12756