Created
February 11, 2026 12:27
-
-
Save Ferdi265/bf580310246171795ce42704b3ed5fc3 to your computer and use it in GitHub Desktop.
dtoa-benchmark on ESP32, esp-idf 6.0-beta1, GCC 15.2, -O2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Preliminary results for dtoa-benchmark ported to ESP32 | |
| Changes: | |
| - remove doubleconv, uscale, and xjb64 because they didn't compile | |
| - change benchmark.cc from_chars to use std::from_chars istead of doubleconv | |
| - change random_digit data to use an std::array and reduce size to 1200 doubles per digit to avoid running out of memory on ESP32 | |
| The above run also has an extra printf when starting a benchmark ("Benchmarking" and "Benchmarked") and disabled verification. | |
| Verification works and has the same output as on x86-64 when not disabled. | |
| I'll do a cleaned up version of this and publish the source code for the port soon. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Type | Function | Digit | Time(ns) | |
|---|---|---|---|---|
| randomdigit | dragonbox | 1 | 31716.083333 | |
| randomdigit | dragonbox | 2 | 30753.000000 | |
| randomdigit | dragonbox | 3 | 33970.083333 | |
| randomdigit | dragonbox | 4 | 33065.000000 | |
| randomdigit | dragonbox | 5 | 37284.500000 | |
| randomdigit | dragonbox | 6 | 36606.083333 | |
| randomdigit | dragonbox | 7 | 39864.000000 | |
| randomdigit | dragonbox | 8 | 40389.000000 | |
| randomdigit | dragonbox | 9 | 40148.750000 | |
| randomdigit | dragonbox | 10 | 41700.666667 | |
| randomdigit | dragonbox | 11 | 44028.750000 | |
| randomdigit | dragonbox | 12 | 44518.000000 | |
| randomdigit | dragonbox | 13 | 46570.333333 | |
| randomdigit | dragonbox | 14 | 45198.166667 | |
| randomdigit | dragonbox | 15 | 50075.333333 | |
| randomdigit | dragonbox | 16 | 50450.083333 | |
| randomdigit | dragonbox | 17 | 52888.583333 | |
| randomdigit | fmt | 1 | 32925.750000 | |
| randomdigit | fmt | 2 | 34926.083333 | |
| randomdigit | fmt | 3 | 35192.583333 | |
| randomdigit | fmt | 4 | 36275.750000 | |
| randomdigit | fmt | 5 | 36639.583333 | |
| randomdigit | fmt | 6 | 37613.583333 | |
| randomdigit | fmt | 7 | 38324.083333 | |
| randomdigit | fmt | 8 | 40434.750000 | |
| randomdigit | fmt | 9 | 47857.916667 | |
| randomdigit | fmt | 10 | 48686.916667 | |
| randomdigit | fmt | 11 | 48451.250000 | |
| randomdigit | fmt | 12 | 48651.333333 | |
| randomdigit | fmt | 13 | 48796.916667 | |
| randomdigit | fmt | 14 | 49160.000000 | |
| randomdigit | fmt | 15 | 49072.500000 | |
| randomdigit | fmt | 16 | 49747.750000 | |
| randomdigit | fmt | 17 | 48648.666667 | |
| randomdigit | null | 1 | 381.500000 | |
| randomdigit | null | 2 | 381.583333 | |
| randomdigit | null | 3 | 381.500000 | |
| randomdigit | null | 4 | 381.500000 | |
| randomdigit | null | 5 | 381.500000 | |
| randomdigit | null | 6 | 381.583333 | |
| randomdigit | null | 7 | 381.500000 | |
| randomdigit | null | 8 | 381.500000 | |
| randomdigit | null | 9 | 381.500000 | |
| randomdigit | null | 10 | 381.583333 | |
| randomdigit | null | 11 | 381.583333 | |
| randomdigit | null | 12 | 381.583333 | |
| randomdigit | null | 13 | 381.500000 | |
| randomdigit | null | 14 | 381.583333 | |
| randomdigit | null | 15 | 381.500000 | |
| randomdigit | null | 16 | 381.500000 | |
| randomdigit | null | 17 | 381.500000 | |
| randomdigit | ostringstream | 1 | 411855.416667 | |
| randomdigit | ostringstream | 2 | 408807.000000 | |
| randomdigit | ostringstream | 3 | 414088.916667 | |
| randomdigit | ostringstream | 4 | 411798.250000 | |
| randomdigit | ostringstream | 5 | 415531.250000 | |
| randomdigit | ostringstream | 6 | 417313.666667 | |
| randomdigit | ostringstream | 7 | 416551.666667 | |
| randomdigit | ostringstream | 8 | 419555.250000 | |
| randomdigit | ostringstream | 9 | 434252.083333 | |
| randomdigit | ostringstream | 10 | 454462.333333 | |
| randomdigit | ostringstream | 11 | 462973.083333 | |
| randomdigit | ostringstream | 12 | 463176.000000 | |
| randomdigit | ostringstream | 13 | 466346.916667 | |
| randomdigit | ostringstream | 14 | 468181.666667 | |
| randomdigit | ostringstream | 15 | 466023.916667 | |
| randomdigit | ostringstream | 16 | 468702.166667 | |
| randomdigit | ostringstream | 17 | 471167.666667 | |
| randomdigit | ryu | 1 | 62868.916667 | |
| randomdigit | ryu | 2 | 61549.750000 | |
| randomdigit | ryu | 3 | 60463.333333 | |
| randomdigit | ryu | 4 | 57545.750000 | |
| randomdigit | ryu | 5 | 56357.000000 | |
| randomdigit | ryu | 6 | 53991.166667 | |
| randomdigit | ryu | 7 | 51763.833333 | |
| randomdigit | ryu | 8 | 50134.833333 | |
| randomdigit | ryu | 9 | 47746.000000 | |
| randomdigit | ryu | 10 | 45673.083333 | |
| randomdigit | ryu | 11 | 43817.166667 | |
| randomdigit | ryu | 12 | 41205.083333 | |
| randomdigit | ryu | 13 | 38128.583333 | |
| randomdigit | ryu | 14 | 34825.666667 | |
| randomdigit | ryu | 15 | 31996.833333 | |
| randomdigit | ryu | 16 | 28508.583333 | |
| randomdigit | ryu | 17 | 27711.666667 | |
| randomdigit | schubfach | 1 | 61947.833333 | |
| randomdigit | schubfach | 2 | 62026.833333 | |
| randomdigit | schubfach | 3 | 62307.583333 | |
| randomdigit | schubfach | 4 | 61860.000000 | |
| randomdigit | schubfach | 5 | 62061.750000 | |
| randomdigit | schubfach | 6 | 62029.166667 | |
| randomdigit | schubfach | 7 | 61787.416667 | |
| randomdigit | schubfach | 8 | 62012.416667 | |
| randomdigit | schubfach | 9 | 61843.916667 | |
| randomdigit | schubfach | 10 | 67523.166667 | |
| randomdigit | schubfach | 11 | 68223.833333 | |
| randomdigit | schubfach | 12 | 68195.000000 | |
| randomdigit | schubfach | 13 | 68090.833333 | |
| randomdigit | schubfach | 14 | 68068.666667 | |
| randomdigit | schubfach | 15 | 67984.166667 | |
| randomdigit | schubfach | 16 | 68079.750000 | |
| randomdigit | schubfach | 17 | 68573.916667 | |
| randomdigit | sprintf | 1 | 121006.916667 | |
| randomdigit | sprintf | 2 | 122863.500000 | |
| randomdigit | sprintf | 3 | 126197.416667 | |
| randomdigit | sprintf | 4 | 126561.250000 | |
| randomdigit | sprintf | 5 | 128027.750000 | |
| randomdigit | sprintf | 6 | 130914.333333 | |
| randomdigit | sprintf | 7 | 130326.250000 | |
| randomdigit | sprintf | 8 | 131050.166667 | |
| randomdigit | sprintf | 9 | 132603.000000 | |
| randomdigit | sprintf | 10 | 136171.083333 | |
| randomdigit | sprintf | 11 | 137401.250000 | |
| randomdigit | sprintf | 12 | 137578.916667 | |
| randomdigit | sprintf | 13 | 139534.833333 | |
| randomdigit | sprintf | 14 | 140787.666667 | |
| randomdigit | sprintf | 15 | 138766.416667 | |
| randomdigit | sprintf | 16 | 140758.916667 | |
| randomdigit | sprintf | 17 | 142673.750000 | |
| randomdigit | to_chars | 1 | 44767.250000 | |
| randomdigit | to_chars | 2 | 43589.500000 | |
| randomdigit | to_chars | 3 | 42588.416667 | |
| randomdigit | to_chars | 4 | 40431.250000 | |
| randomdigit | to_chars | 5 | 39263.333333 | |
| randomdigit | to_chars | 6 | 37494.916667 | |
| randomdigit | to_chars | 7 | 35722.250000 | |
| randomdigit | to_chars | 8 | 34244.500000 | |
| randomdigit | to_chars | 9 | 32362.750000 | |
| randomdigit | to_chars | 10 | 30660.833333 | |
| randomdigit | to_chars | 11 | 29215.833333 | |
| randomdigit | to_chars | 12 | 26849.916667 | |
| randomdigit | to_chars | 13 | 24128.416667 | |
| randomdigit | to_chars | 14 | 21343.166667 | |
| randomdigit | to_chars | 15 | 18694.333333 | |
| randomdigit | to_chars | 16 | 15643.583333 | |
| randomdigit | to_chars | 17 | 14724.750000 | |
| randomdigit | yy | 1 | 49310.583333 | |
| randomdigit | yy | 2 | 51406.416667 | |
| randomdigit | yy | 3 | 52825.166667 | |
| randomdigit | yy | 4 | 53966.250000 | |
| randomdigit | yy | 5 | 55225.333333 | |
| randomdigit | yy | 6 | 53503.416667 | |
| randomdigit | yy | 7 | 53042.083333 | |
| randomdigit | yy | 8 | 56002.166667 | |
| randomdigit | yy | 9 | 54718.833333 | |
| randomdigit | yy | 10 | 54196.166667 | |
| randomdigit | yy | 11 | 54485.166667 | |
| randomdigit | yy | 12 | 56586.500000 | |
| randomdigit | yy | 13 | 56130.083333 | |
| randomdigit | yy | 14 | 54982.750000 | |
| randomdigit | yy | 15 | 56434.416667 | |
| randomdigit | yy | 16 | 57619.166667 | |
| randomdigit | yy | 17 | 58890.833333 | |
| randomdigit | zmij | 1 | 23521.833333 | |
| randomdigit | zmij | 2 | 23510.500000 | |
| randomdigit | zmij | 3 | 23539.166667 | |
| randomdigit | zmij | 4 | 23445.250000 | |
| randomdigit | zmij | 5 | 23511.583333 | |
| randomdigit | zmij | 6 | 23529.000000 | |
| randomdigit | zmij | 7 | 23460.583333 | |
| randomdigit | zmij | 8 | 23577.666667 | |
| randomdigit | zmij | 9 | 23907.000000 | |
| randomdigit | zmij | 10 | 25981.916667 | |
| randomdigit | zmij | 11 | 26203.500000 | |
| randomdigit | zmij | 12 | 26287.083333 | |
| randomdigit | zmij | 13 | 26253.666667 | |
| randomdigit | zmij | 14 | 26231.833333 | |
| randomdigit | zmij | 15 | 26393.833333 | |
| randomdigit | zmij | 16 | 26238.583333 | |
| randomdigit | zmij | 17 | 26418.000000 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| registering method dragonbox | |
| registering method fmt | |
| registering method null | |
| registering method ostringstream | |
| registering method ryu | |
| registering method schubfach | |
| registering method sprintf | |
| registering method to_chars | |
| registering method yy | |
| registering method zmij | |
| Benchmarking randomdigit dragonbox ... | |
| Benchmarked randomdigit dragonbox ... [30753.000ns, 52888.583ns] | |
| Benchmarking randomdigit fmt ... | |
| Benchmarked randomdigit fmt ... [32925.750ns, 49747.750ns] | |
| Benchmarking randomdigit null ... | |
| Benchmarked randomdigit null ... [ 381.500ns, 381.583ns] | |
| Benchmarking randomdigit ostringstream ... | |
| Benchmarked randomdigit ostringstream ... [408807.000ns, 471167.667ns] | |
| Benchmarking randomdigit ryu ... | |
| Benchmarked randomdigit ryu ... [27711.667ns, 62868.917ns] | |
| Benchmarking randomdigit schubfach ... | |
| Benchmarked randomdigit schubfach ... [61787.417ns, 68573.917ns] | |
| Benchmarking randomdigit sprintf ... | |
| Benchmarked randomdigit sprintf ... [121006.917ns, 142673.750ns] | |
| Benchmarking randomdigit to_chars ... | |
| Benchmarked randomdigit to_chars ... [14724.750ns, 44767.250ns] | |
| Benchmarking randomdigit yy ... | |
| Benchmarked randomdigit yy ... [49310.583ns, 58890.833ns] | |
| Benchmarking randomdigit zmij ... | |
| Benchmarked randomdigit zmij ... [23445.250ns, 26418.000ns] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment