> > FWIW, I played around with various other versions of this function, using a > comparison tree similar to the C++ code and such but nothing beat your > simpled unrolled loop in python 2.x. Calling dis.dis() on each function to > see the python byte code disassembly is revealing. > > side note: Interestingly a few approaches were better when the uint64 > parameter was a long() rather than an int(), so that may be more useful when > we get this working on python 3.x where all integers use the 2.x long() > bignum type internally. In particular an approach using > bisect.bisect_left() to get the return value by doing a table lookup was > faster whenever the input was a long(). > > The other versions i was playing with are included in the attached file incase anyone is curious.
--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/protobuf?hl=en -~----------~----~----~----~------~----~------~--~---
size_calc_gps01.py
Description: Binary data
