univalue: hand written conversion of number to string #25711
pull MarcoFalke wants to merge 1 commits into bitcoin:master from MarcoFalke:2207-faster-univalue-💡 changing 2 files +61 −10-
MarcoFalke commented at 12:55 pm on July 26, 2022: memberThis commit is taken from https://github.com/bitcoin-core/univalue-subtree/commit/284f76366b085f6de9ffaa1d7767de71eab2868e (first commit of https://github.com/bitcoin-core/univalue-subtree/pull/27).
-
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.
-
MarcoFalke added the label Refactoring on Jul 26, 2022
-
MarcoFalke commented at 12:56 pm on July 26, 2022: memberI have only cherry-picked this for conceptual discussion. I have not yet run a benchmark. cc @martinus
-
MarcoFalke commented at 3:00 pm on July 26, 2022: memberThis needs the sanitizer warning fixed somehow, so I am leaving it for others to pick up, if they want.
-
MarcoFalke closed this on Jul 26, 2022
-
MarcoFalke deleted the branch on Jul 26, 2022
-
fanquake added the label Up for grabs on Jul 26, 2022
-
bitcoin locked this on Jul 26, 2023
Labels
Refactoring
Up for grabs
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: 2024-12-30 15:12 UTC
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: 2024-12-30 15:12 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me
More mirrored repositories can be found on mirror.b10c.me