On 06/30/2018 03:50 AM, hh via use-livecode wrote:
Mark,
obviously you ask relating to Bob's IPv4 sort problem.
A perceptive observation, as always.
But when optimising (for speed) the connected formula
(1) a + b * 2^8 + c * 2^16 + d * 2^32
using the constants is slightly faster:
(2) a + b * 256 + c * 65536 + d * 16777216
Would bitOr operators increase the speed over additions?
Why is the engine not handling the internal bitshifts easier with (1)?
Indeed. I'm not too upset about the loss of the bitshift operators other
than the lack of backward compatibility, but I'm surprised by their
demise. In terms of minimal use of microprocessor cycles I'd expect that
the fastest would be
a || (b << 8) || (c << 16) || (d << 32)
--
Mark Wieder
ahsoftw...@gmail.com
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode