4 ms·
Hm, there are already some comments about possible optimizations kicking in and asking for assembly code (which is always a good idea to look for changes). Howe
by sb 14y ago
Hm, there are already some comments about possible optimizations kicking in and asking for assembly code (which is always a good idea to look for changes). However, before doing all of these things, I would want to know how these results were measured? How many repetitions, which machine configuration, standard deviation, etc. It could very well be that this behavior is due to some pre-caching in Windows or some other external factor.
- latitude 14y agoThis is a part of a custom malloc(). The test involves running p = malloc(); free(p); in a tight loop for 5 seconds, generating about 60,000,000 traversals of the code in question. The slower version yields a loop count of around 67,... and the faster version bumps it to over 70,... Not quite 5%, but in thereabouts.