Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2025-01-21 17:06:39


Ivan Matek wrote:
> There is also the fact that fastest type may not be fastest for all compute
> benchmarks you can imagine, I presume on modern CPUs this does not
> matter, but maybe for some old CPU for add one type is fastest, for mul other
> is...

On modern compilers, the knowledge the compiler derives from knowing
that the value fits in 16 bits (when uint16_t is used) is generally much more
valuable (because it allows the backend to pick the right instructions) than
when uint_fast16_t = uint64_t is used.

Basically, _fast types are almost never fast. Let's hope this curse doesn't
afflict Decimal _fast types as well. :-)


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk