Re: bitop multiplication overflow semantics
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: bitop multiplication overflow semantics
- From: Mike Pall <mikelu-1301@...>
- Date: 2013年1月21日 16:55:36 +0100
Cosmin Apreutesei wrote:
> Thanks Mike, in the meantime I've done some quick tests and the
> results are surprising:
>
> 1) Lua implementation[1] -- 230 MB/s
The speed doubles with this (avoids conversions to/from doubles):
local tobit = bit.tobit
...
for i=0,nblocks-1 do
h1 = tobit(mmul(...) + 0xe6546b64)
end
Some inefficiencies remain wrt. conversions and a missing strength
reduction of the multiply. I've fixed that in git HEAD and I'm now
getting the promised 2 GB/s.
--Mike