Backwards I/O vs. Forward I/O
I mentioned it in the past, and so did Taras, static initializers are currently called in reverse order of their location in a library. This can be seen, for example, in the various graphs I gathered about startup I/O. I also mentioned that I had written a small tool reversing these static initializers in ELF binaries. I however hadn't checked the impact on startup. Until today.
The testing setup still remains the same as in previous posts and the results are still the average and 95% confidence interval for 50 startups of an unmodified Firefox 4.0b8 build.
With backwards static initializers (ms) | With forward static initializers (ms) | Difference | |
---|---|---|---|
x86 | 3,228.76 ± 0.57% | 2,888.44 ± 0.55% | 340.32 (10.5%) |
x86-64 | 3,382.0 ± 0.51% | 3,102.46 ± 0.51% | 279.54 (8.26%) |
I'm actually surprised by the result. I did expect that forward reads would be slightly faster than backwards reads, I wasn't expecting that much difference.
I guess I should work on bug 606137, then. Combined with relocations packing that landed after beta 10, it should have a nice startup impact.
2011-02-01 17:45:23+0900
You can leave a response, or trackback from your own site.