Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
test iseual vs json.stringify
(version: 0)
Comparing performance of:
isequal vs stringify
Created:
3 years ago
by:
Guest
Jump to the latest result
HTML Preparation code:
<script src="https://cdn.jsdelivr.net/npm/lodash@4.17.4/lodash.min.js"></script>
Script Preparation code:
window.a = {bids: [ [41634.5, 0.0], [41641.0, 600000.0], [42285.0, 0.0], [42291.5, 300000.0], [42504.5, 60000.0], [42507.5, 0.0], [42719.0, 0.0], [42719.5, 470742.0], [42725.5, 225000.0], [42734.0, 0.0], [43066.0, 0.0], [43072.5, 225000.0], [43153.0, 0.0], [43153.5, 233493.0], [43159.5, 225000.0], [43167.5, 1998005.0], [43168.0, 0.0], [43168.5, 0.0], [43171.5, 0.0], [43239.0, 80000.0], [43269.5, 250000.0], [43270.5, 0.0], [43285.0, 199.0], [43287.5, 1977.0], [43288.5, 0.0], [43295.5, 0.0], [43327.5, 59340.0], [43333.5, 0.0], [43335.0, 0.0], [43338.5, 20000.0], [43343.5, 10000.0], ], asks: [ [43379.0, 10000.0], [43383.0, 10000.0], [43403.0, 78676.0], [43403.5, 23218.0], [43404.0, 0.0], [43406.5, 450.0], [43427.0, 2086.0], [43430.5, 117604.0], [43431.0, 20000.0], [43437.5, 199999.0], [43445.0, 0.0], [43446.0, 19616.0], [43506.5, 0.0], [43507.0, 140114.0], [43531.0, 0.0], [43593.5, 0.0], [43594.0, 225000.0], [43680.5, 0.0], [43681.0, 300000.0], [43896.5, 485213.0], [43897.0, 0.0], [43897.5, 300000.0], [43911.0, 0.0], [44461.5, 0.0], [44462.0, 400000.0], [45111.0, 0.0], [45112.5, 600000.0], ]} window.b = { bids: [ [41634.5, 0.0], [41641.0, 600000.0], [42285.0, 0.0], [42291.5, 300000.0], [42504.5, 60000.0], [42507.5, 0.0], [42719.0, 0.0], [42719.5, 470742.0], [42725.5, 225000.0], [42734.0, 0.0], [43066.0, 0.0], [43072.5, 225000.0], [43153.0, 0.0], [43153.5, 233493.0], [43159.5, 225000.0], [43167.5, 1998005.0], [43168.0, 0.0], [43168.5, 0.0], [43171.5, 0.0], [43239.0, 80000.0], [43269.5, 250000.0], [43270.5, 0.0], [43285.0, 199.0], [43287.5, 1977.0], [43288.5, 0.0], [43295.5, 0.0], [43327.5, 59340.0], [43333.5, 0.0], [43335.0, 0.0], [43338.5, 20000.0], [43343.5, 10000.0], ], asks: [ [43379.0, 10000.0], [43383.0, 10000.0], [43403.0, 78676.0], [43403.5, 23218.0], [43404.0, 0.0], [43406.5, 450.0], [43427.0, 2086.0], [43430.5, 117604.0], [43431.0, 20000.0], [43437.5, 199999.0], [43445.0, 0.0], [43446.0, 19616.0], [43506.5, 0.0], [43507.0, 140114.0], [43531.0, 0.0], [43593.5, 0.0], [43594.0, 225000.0], [43680.5, 0.0], [43681.0, 300000.0], [43896.5, 485213.0], [43897.0, 0.0], [43897.5, 300000.0], [43911.0, 0.0], [44461.5, 0.0], [44462.0, 400000.0], [45111.0, 0.0], [45112.5, 600000.0], ]}
Tests:
isequal
_.isEqual(window.a, window.b)
stringify
JSON.stringify(window.a) === JSON.stringify(window.b);
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
isequal
stringify
Fastest:
N/A
Slowest:
N/A
Latest run results:
No previous run results
This benchmark does not have any results yet. Be the first one
to run it!
Autogenerated LLM Summary
(model
llama3.2:3b
, generated one year ago):
It seems like we're dealing with some benchmarking data here! Based on the provided data, I'll attempt to extract relevant information and provide an answer. **Data Points:** 1. **Benchmark Definition**: `_.isEqual(window.a, window.b)` (isequal) 2. **Test Name**: `isequal` 3. **JSON Data**: The following JSON data is associated with each benchmark: * `window.a`: An array of numbers and objects * `window.b`: Another array of numbers and objects **Question:** The question appears to be asking for the performance difference between two different methods for comparing the equality of these arrays: 1. Using Lodash's `_.isEqual()` function (`_.isEqual(window.a, window.b)`) 2. Using `JSON.stringify()` with a comparison (`JSON.stringify(window.a) === JSON.stringify(window.b)`) **Answer:** To provide an answer to this question, I would need more information about the desired outcome or the specific requirements of the benchmarking scenario. However, based on the provided data, it seems like we have two sets of results: 1. **Raw Benchmark Results**: The latest benchmark result shows the execution times for each test: * `isequal`: 153560.703125 executions per second (Yandex Browser 23) * `stringify`: 105441.265625 executions per second (Yandex Browser 23) **Conclusion:** Without further context or additional information, it's challenging to provide a definitive answer. However, based on the provided data, we can say that: * Using Lodash's `_.isEqual()` function (`_.isEqual(window.a, window.b)`) seems to be slightly faster than using `JSON.stringify()` with a comparison (`JSON.stringify(window.a) === JSON.stringify(window.b)`). * The execution times are relatively close for both tests on the specified device and browser. If you could provide more context or clarify your question, I'd be happy to help further!
Related benchmarks:
compare arrays 22
compare arrays 23
JS Deep Comparison Performance
Stringify vs Lodash Deep Comparison Performance
Comments
Confirm delete:
Do you really want to delete benchmark?