Latin-1 decoding change
Originally I started this blog with the intent that each post would be about a particular commit. Here's a post back in that vein, about a change I had no involvement in but thought might be of interest to you:
WebKit bug 35233 — Optimize Latin-1 decoding in TextCodecLatin1::decode()
How many ways do I like this change?
- Nokia wrote it but we all benefit from it;
- C++ master Darin proposed a template-hacker modification to it that makes it type-safe without losing the speed benefit;
- The precommit bots that Googlers wrote caught that an earlier version would've broken the 32-bit Mac build;
- The patch itself is a simple but clever low-hanging-fruit optimization.
The only piece it's missing is a regression test, but I guess WebKit currently doesn't have a lot in the way of performance regression tests.
PS: Since I'm again deep in a free-software lovefest, I'll just bury here that it's also pretty neat that Mozilla is both using bits of Nitro (one of the many confusing names of the Apple JavaScript engine) for improving JS speed and bits of Chrome for its out of process plugins. My mind circles around all of the biological metaphors we use for these things — source trees, cross-pollination of ideas — and I feel briefly like I'm living in the future.