Skip to content

Add in explicit information about performance of fast values #1114

@mborland

Description

@mborland

I have a question, is it possible at all that on some platform the "fast"
types are slower than the IEEE 754 types?

For basic operations no. The two slowest parts for any operation are decoding the value, and normalization to remove the effects of cohorts. The fast types are a struct that stores the value always normalized, and decoded. The operations can be a bit slower for the fast types. from_chars has to go through the normalization steps for the fast types only, and to_chars has to strip off all the trailing zeros that normalization adds. If we assume you do from_chars and to_chars once each per value the extra expense gets amortized quickly into actually performing calculations with the value.

This is a very important information and it belongs in the library docs. I would also request that you describe what happens upon addition, when a new number is being produced: which item from the cohort is chosen? Does that matter for performance?

Metadata

Metadata

Assignees

Labels

Boost ReviewCollected Comments from Boost Review PerioddocumentationImprovements or additions to documentation

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions