imageworks/OpenShadingLanguage — pull request #266 by brechtvl (2013-06-20 01:04:46+00:00)
Title: Small optimization to SimplePool.alloc to avoid slow integer modulo

I found SimplePool.alloc taking up about 4% of render time in some of my simpler tests scenes. This changes speeds up those scenes consistently by about 3%.

It seems that all the places that call this already use powers of two, and similar system functions like posix_memalign also require the alignment parameter to be a power of two.