Closed jamesladd closed 13 years ago
Does the compiler not perform this optimization anyway?
The compiler doesn't - I listed the assembler generated. In this particular case the saving is just a pointer dereference, and probably hardly worth the patch. However - if the call had been a 'strlen' then the saving would be worth while.
On Tue, Oct 18, 2011 at 4:27 PM, Brian Buchanan < reply@reply.github.com>wrote:
Does the compiler not perform this optimization anyway?
Reply to this email directly or view it on GitHub: https://github.com/zeromq/rbzmq/pull/15#issuecomment-2438193
Its a small thing, but there is no need to dereference the string length twice.