diff options
author | Gavin Howard <gavin@yzena.com> | 2021-07-10 16:33:12 -0600 |
---|---|---|
committer | Gavin Howard <gavin@yzena.com> | 2021-07-10 16:33:12 -0600 |
commit | 3c7ce5bd3d498cedf4365f18549c2cf0fa487842 (patch) | |
tree | 47ea1178c56bb0231fdc12677fa109e8a09b7899 /manuals/dc/EN.1.md | |
parent | 8468cab9488c521c69f4406c20fe1a84a2e99e53 (diff) | |
download | platform_external_bc-3c7ce5bd3d498cedf4365f18549c2cf0fa487842.tar.gz platform_external_bc-3c7ce5bd3d498cedf4365f18549c2cf0fa487842.tar.bz2 platform_external_bc-3c7ce5bd3d498cedf4365f18549c2cf0fa487842.zip |
Make bc_num_irand() vastly more efficient
This removes all math in it, and just has it generate hardware integers
up to BC_BASE until at the last limb of the limit. If the limit's limb
is one, we skip; otherwise, we generate with the limb as the limit.
From taking a minute to run the irand_long benchmark to 17 seconds. The
change on the irand_short benchmark was minor enough to not count, but
since there was no change there, the long benchmark matters.
Signed-off-by: Gavin Howard <gavin@yzena.com>
Diffstat (limited to 'manuals/dc/EN.1.md')
0 files changed, 0 insertions, 0 deletions