Skip to content

Some tuning#33

Merged
lemire merged 4 commits into
masterfrom
some_tuning
Apr 21, 2025
Merged

Some tuning#33
lemire merged 4 commits into
masterfrom
some_tuning

Conversation

@lemire
Copy link
Copy Markdown
Member

@lemire lemire commented Apr 18, 2025

  1. I have added filtering to the 32-bit and 64-bit test programs (exhaustivefloat32 and thoroughfloat64) so we can test just one algorithm.
  2. I have tuned the string generation used for grisu_exact and teju_jagua. See below for results.
  3. I changed how we can filter several algos... you do "-a myalgo1,myalgo2".
  4. In the benchmarks, we now also benchmark the 'string only' conversion (see point 2).

Before (master):

grisu_exact                   :   19.19 i/B   360.70 i/f (+/- 0.0 %)      29.16 b/f     
teju_jagua                    :   16.56 i/B   311.26 i/f (+/- 0.0 %)      29.16 b/f   

This PR:

grisu_exact                   :   18.55 i/B   348.66 i/f (+/- 0.0 %)      28.36 b/f     
teju_jagua                    :   15.92 i/B   299.22 i/f (+/- 0.0 %)      28.36 b/f   

So slightly fewer instructions.

What my results seem to indicate is that we are heavily bounded on the string generation part. That is, printing out the characters is the slow part.

I think that teju_jagua fails exhaustivefloat32, but it did before too... so I do not think it is a new bug.

Interestingly, merely printing the characters from the mantissa can be slower than the whole dragonbox algorithm !!!

@lemire lemire requested a review from jaja360 April 18, 2025 21:52
Comment thread benchmarks/ieeeToString.cpp
@lemire
Copy link
Copy Markdown
Member Author

lemire commented Apr 21, 2025

@jaja360 Merging.

@lemire lemire merged commit 59a6cf1 into master Apr 21, 2025
8 checks passed
@jaja360 jaja360 deleted the some_tuning branch April 22, 2025 00:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants