Unusual speed boost: size matters
webkit.org
Unusual speed boost: size matters
1–10 of 74 posts
Re: Unusual speed boost: size matters
#2Re: Unusual speed boost: size matters
#3Re: Unusual speed boost: size matters
#4The major downsides are that you can only optimize what the profiler can see and running the thing to make a build takes forever.
Re: Unusual speed boost: size matters
#5You would be just as well off making computeWidth const/pure/readonly/whatever
The compiler can even detect if it modifies anything and mark it for you. In fact, better compilers will compute mod/ref information and know that m_cachedWidth is not touched over that call.
However, LLVM's (which is what at least Apple is using) basic stateless alias analysis is not good enough to do this in this kind of case (there are some exceptions where it might be able to, none apply here)
This is actually a great example of how improving pointer and alias analysis in a compiler buys you gains, and not an example of "how you should modify your code", since you generally should not modify your code to work around temporary single-compiler deficiencies without very good reason.
Especially considering how quickly compiler releases are pushed by Apple/et al.
Re: Unusual speed boost: size matters
#6Without a doubt, WebKit is one of the most interesting parts of Apple. A community of open source developers that accept contributions (I'm assuming) with a developer-focused open blog with tips on writing C++ - a language not even particularly widely used elsewhere in Apple.
I wonder how their team could swing that culture without tripping over legal at every turn.
Re: Unusual speed boost: size matters
#7I may have missed it, but were there any stats about the actual performance gains? It often mentioned binary size etc but nothing about the impact it had.
What did that 6% binary size reduction buy them in startup time? 10ms? 300ms?
What about memory consumption after startup?
Did tests indicate that the memory locality had improved CPU performance in noticeable manner?
Re: Unusual speed boost: size matters
#8Re: Unusual speed boost: size matters
#9Without a doubt, WebKit is one of the most interesting parts of Apple. A community of open source developers that accept contributions (I'm assuming) with a developer-focused open blog with tips on writing C++ - a language not even particularly widely used elsewhere in Apple.
I concur. When I was there, they were pretty clear that everything I made belonged to Apple (which was total bullshit according to California law), that nothing we made would ever be open sourced due to patent issues, and that I was to never say anything about the company in public. I wonder how their team could swing that culture without tripping over legal at every turn.