New benchmark for int64, double and number for both ondemand and dom - #2807
Open
fior512 wants to merge 1 commit into
Open
New benchmark for int64, double and number for both ondemand and dom#2807fior512 wants to merge 1 commit into
fior512 wants to merge 1 commit into
Conversation
benchmark have compiler flags to choose which one to run (same method as benchmark/dom/parse.cpp) use same benchmarking process as car_builder (with event_counter.h)
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds benchmarks for:
get_int64(),get_double()andget_number()get_int64()andget_double()it uses
counters/event_counter.h, createpadded_jsonfilled withint64and/ordouble(both simultaneously forget_number()).bench parameters:
Since it benchs 5 functions over 3 sizes, i added compiler flags (as
benchmark/dom/parse.cppdoes), to test only int64 or double or number; if no flag given, it will run all benchs. Flags are:BENCH_ONLY_INT(through: bench_number_accessors_int)BENCH_ONLY_DOUBLE(through: bench_number_accessors_double)BENCH_ONLY_NUMBER(through: bench_number_accessors_number)For the same reason, i opted for a sligthly different ouput format that usual (looking for feedbacks).
int32:
Trial 1: 5 digits: ondemand_get_int64 : 3.85 ns/value 1.69 GB/s 5.17 GHz 19.90 cycles/value 85.77 ins./value 4.31 i/c dom_get_int64 : 0.22 ns/value 29.91 GB/s 5.06 GHz 1.10 cycles/value 8.00 ins./value 7.27 i/c 12 digits: ondemand_get_int64 : 7.55 ns/value 1.79 GB/s 5.16 GHz 38.95 cycles/value 148.87 ins./value 3.82 i/c dom_get_int64 : 0.21 ns/value 64.02 GB/s 5.12 GHz 1.08 cycles/value 8.00 ins./value 7.41 i/c 19 digits: ondemand_get_int64 : 10.47 ns/value 1.96 GB/s 5.26 GHz 55.06 cycles/value 212.58 ins./value 3.86 i/c dom_get_int64 : 0.21 ns/value 95.98 GB/s 5.16 GHz 1.10 cycles/value 8.00 ins./value 7.26 i/c Trial 2: 5 digits: ondemand_get_int64 : 3.83 ns/value 1.70 GB/s 5.22 GHz 19.99 cycles/value 85.77 ins./value 4.29 i/c dom_get_int64 : 0.21 ns/value 30.98 GB/s 5.16 GHz 1.08 cycles/value 8.00 ins./value 7.39 i/c 12 digits: ondemand_get_int64 : 7.43 ns/value 1.82 GB/s 5.26 GHz 39.07 cycles/value 148.87 ins./value 3.81 i/c dom_get_int64 : 0.20 ns/value 66.41 GB/s 5.15 GHz 1.05 cycles/value 8.00 ins./value 7.64 i/c 19 digits: ondemand_get_int64 : 10.49 ns/value 1.95 GB/s 5.25 GHz 55.07 cycles/value 212.58 ins./value 3.86 i/c dom_get_int64 : 0.21 ns/value 99.65 GB/s 5.12 GHz 1.05 cycles/value 8.00 ins./value 7.60 i/c Trial 3: 5 digits: ondemand_get_int64 : 3.85 ns/value 1.69 GB/s 5.17 GHz 19.93 cycles/value 85.77 ins./value 4.30 i/c dom_get_int64 : 0.21 ns/value 30.63 GB/s 5.16 GHz 1.10 cycles/value 8.00 ins./value 7.30 i/c 12 digits: ondemand_get_int64 : 7.43 ns/value 1.82 GB/s 5.26 GHz 39.09 cycles/value 148.87 ins./value 3.81 i/c dom_get_int64 : 0.21 ns/value 65.48 GB/s 5.16 GHz 1.06 cycles/value 8.00 ins./value 7.52 i/c 19 digits: ondemand_get_int64 : 10.65 ns/value 1.93 GB/s 5.25 GHz 55.86 cycles/value 212.58 ins./value 3.81 i/c dom_get_int64 : 0.20 ns/value 100.90 GB/s 5.16 GHz 1.05 cycles/value 8.00 ins./value 7.63 i/cdouble:
Trial 1: 5 digits: ondemand_get_double : 11.53 ns/value 1.00 GB/s 5.17 GHz 59.58 cycles/value 162.17 ins./value 2.72 i/c dom_get_double : 0.57 ns/value 20.25 GB/s 5.29 GHz 3.01 cycles/value 8.00 ins./value 2.66 i/c 12 digits: ondemand_get_double : 11.45 ns/value 1.62 GB/s 5.13 GHz 58.68 cycles/value 234.38 ins./value 3.99 i/c dom_get_double : 0.57 ns/value 32.43 GB/s 5.27 GHz 3.01 cycles/value 8.00 ins./value 2.66 i/c 19 digits: ondemand_get_double : 18.79 ns/value 1.36 GB/s 5.15 GHz 96.72 cycles/value 346.49 ins./value 3.58 i/c dom_get_double : 0.57 ns/value 45.02 GB/s 5.31 GHz 3.01 cycles/value 8.00 ins./value 2.66 i/c Trial 2: 5 digits: ondemand_get_double : 11.33 ns/value 1.01 GB/s 5.26 GHz 59.57 cycles/value 162.17 ins./value 2.72 i/c dom_get_double : 0.57 ns/value 20.13 GB/s 5.26 GHz 3.01 cycles/value 8.00 ins./value 2.66 i/c 12 digits: ondemand_get_double : 11.43 ns/value 1.62 GB/s 5.14 GHz 58.70 cycles/value 234.38 ins./value 3.99 i/c dom_get_double : 0.57 ns/value 32.46 GB/s 5.28 GHz 3.01 cycles/value 8.00 ins./value 2.66 i/c 19 digits: ondemand_get_double : 18.62 ns/value 1.37 GB/s 5.21 GHz 97.05 cycles/value 346.49 ins./value 3.57 i/c dom_get_double : 0.56 ns/value 45.32 GB/s 5.35 GHz 3.01 cycles/value 8.00 ins./value 2.66 i/c Trial 3: 5 digits: ondemand_get_double : 11.56 ns/value 1.00 GB/s 5.22 GHz 60.31 cycles/value 162.17 ins./value 2.69 i/c dom_get_double : 0.56 ns/value 20.44 GB/s 5.35 GHz 3.01 cycles/value 8.00 ins./value 2.66 i/c 12 digits: ondemand_get_double : 11.32 ns/value 1.64 GB/s 5.21 GHz 59.01 cycles/value 234.38 ins./value 3.97 i/c dom_get_double : 0.56 ns/value 32.82 GB/s 5.34 GHz 3.01 cycles/value 8.00 ins./value 2.66 i/c 19 digits: ondemand_get_double : 18.60 ns/value 1.37 GB/s 5.23 GHz 97.30 cycles/value 346.49 ins./value 3.56 i/c dom_get_double : 0.56 ns/value 45.27 GB/s 5.35 GHz 3.01 cycles/value 8.00 ins./value 2.66 i/cnumber:
Trial 1: 5 digits: ondemand_get_number : 13.25 ns/value 0.68 GB/s 5.18 GHz 68.67 cycles/value 158.98 ins./value 2.31 i/c 12 digits: ondemand_get_number : 13.52 ns/value 1.18 GB/s 5.18 GHz 70.03 cycles/value 201.63 ins./value 2.88 i/c 19 digits: ondemand_get_number : 79.87 ns/value 0.29 GB/s 5.23 GHz 417.54 cycles/value 1423.02 ins./value 3.41 i/c Trial 2: 5 digits: ondemand_get_number : 13.07 ns/value 0.69 GB/s 5.23 GHz 68.41 cycles/value 158.98 ins./value 2.32 i/c 12 digits: ondemand_get_number : 13.43 ns/value 1.19 GB/s 5.23 GHz 70.23 cycles/value 201.63 ins./value 2.87 i/c 19 digits: ondemand_get_number : 79.72 ns/value 0.29 GB/s 5.16 GHz 411.74 cycles/value 1423.02 ins./value 3.46 i/c Trial 3: 5 digits: ondemand_get_number : 13.02 ns/value 0.69 GB/s 5.23 GHz 68.11 cycles/value 158.98 ins./value 2.33 i/c 12 digits: ondemand_get_number : 13.40 ns/value 1.19 GB/s 5.23 GHz 70.10 cycles/value 201.63 ins./value 2.88 i/c 19 digits: ondemand_get_number : 79.52 ns/value 0.29 GB/s 5.23 GHz 415.98 cycles/value 1423.02 ins./value 3.42 i/cCloses #2186
Happy to change anything based on your feedback !!