[zeromq-dev] [PATCH] uuid_t source code significantly simplified

Martin Sustrik sustrik at 250bpm.com
Tue Apr 26 15:05:16 CEST 2011


On 04/26/2011 09:59 AM, Pieter Hintjens wrote:
> You might use a hex-to-bin conversion without conditionals, if
> performance is important.

This code is not on the critical path, so few nanoseconds more or less 
don't make difference.

What would be good though is reducing the amount of code that we have to 
manage.

What happens now is that foreign function is invoked to generate a 
binary UUID, afterwards it's converted into a string by another foreign 
function and then the string is converted back to binary by 0MQ.

The whole show is performed just to ensure that the binary encoding of 
UUIDs on the wire is the same for all OSes and microarchitectures. If 
careful investigation is made, we can possibly avoid the two back and 
forth conversion steps.

Martin



More information about the zeromq-dev mailing list