Commit 05a4c221 authored by Marcus Holland-Moritz's avatar Marcus Holland-Moritz Committed by Facebook Github Bot 7

Add more benchmarks for integer-to-string conversion

Summary:
In preparation for some changes to the integer-to-string conversion
code, this change adds, this adds some more benchmarks, and attempts
to update the existing ones to be less prone to the optimizations
where the compiler already knows about the constant values being
passed in.

There also were a couple of flaws in the existing benchmarks, where
instead of computing the value to be converted from a start value
and the loop counter, it rather added the (constant) total iteration
count to the value, ending up with a constant. But, worse than just
using a constant, the code that was trying to evaluate the cost of
converting a single-digit would generally end up computing the cost
of a five-digit number, which resulted in the benchmarks showing
identical figures regardless of the number of digits for small digit
counts.

The change also adds benchmarks for positive/negative signed integers
and 128-bit integers.

Reviewed By: yfeldblum

Differential Revision: D3455815

fbshipit-source-id: a20821c7d460bc05453655d0c848a0c9a47520fd
parent 29c7ba51
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment