Boost logo

Boost Users :

Subject: Re: [Boost-users] Boost or Standard when there is the choice?
From: Ion Gaztañaga (igaztanaga_at_[hidden])
Date: 2014-02-16 15:50:40


El 16/02/2014 20:34, Joaquin M Lopez Munoz escribió:
> Each h%constant operation the compiler is able to heavily optimize by
> emulating integer division with precalculated multiplications (there's a
> section in Hacker's Delight on this I guess). I took a look at the
> generated assembly code and integer divisions were in fact gone, and
> the thing is considerably faster despite the huge number of cases
> (switching on [0,...n) can be coded very efficiently and I think CPU
> branch prediction plays a role here also).

Awesome Joaquín. Thanks for sharing this.

Best,

Ion


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net