Boost logo

Boost :

From: John Max Skaller (skaller_at_[hidden])
Date: 2001-07-04 14:14:44


helmut.zeisel_at_[hidden] wrote:

> But how do you portable specify the fastest word size?

        You could use C99's

        uintmax_t

which is the biggest
rather than the fastest. Or you could use

        uint_fast64_t

on the basis the compiler can generate much better long
operations than you can hope to do in C.

Another solution is to use

        boost_multiple_precision_word_t

and leave it to the configuration system to pick the best
word size.

        While there is no run-time penalty for using a template,
there's a compile time one. And something much worse:
you'd be delegating a difficult technical decision to a
non-expert. And something even worse than that: third
party libraries might use different types, so you might
end up with multiple representations that can't interoperate.

-- 
John (Max) Skaller, mailto:skaller_at_[hidden] 
10/1 Toxteth Rd Glebe NSW 2037 Australia voice: 61-2-9660-0850
New generation programming language Felix  http://felix.sourceforge.net
Literate Programming tool Interscript     
http://Interscript.sourceforge.net

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