univalue: hand written conversion of number to string #25711

pull maflcko wants to merge 1 commits into bitcoin:master from maflcko:2207-faster-univalue-💡 changing 2 files +61 −10
  1. hand written conversion of number to string
    The function appendNumToString is much faster than using a temporary
    ostringstream. The implementation is locale independent, and does not
    allocate any additional memory.
    
    In my tests, Bitcoin's BlockToJsonVerbose benchmark runs ~11% faster
    with that patch.
    
    Also added a test for the corner cases.
    32bd837332
  2. maflcko added the label Refactoring on Jul 26, 2022
  3. maflcko commented at 12:56 PM on July 26, 2022: member

    I have only cherry-picked this for conceptual discussion. I have not yet run a benchmark. cc @martinus

  4. maflcko commented at 3:00 PM on July 26, 2022: member

    This needs the sanitizer warning fixed somehow, so I am leaving it for others to pick up, if they want.

  5. maflcko closed this on Jul 26, 2022

  6. maflcko deleted the branch on Jul 26, 2022
  7. fanquake added the label Up for grabs on Jul 26, 2022
  8. bitcoin locked this on Jul 26, 2023
  9. maflcko removed the label Up for grabs on Jul 24, 2025
Contributors

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-22 06:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me