https://lemire.me/blog/2024/02/09/json-parsing-intel-sapphire-rapids-versus-amd-zen-4/ Skip to content Daniel Lemire's blog Daniel Lemire is a computer science professor at the Data Science Laboratory of the Universite du Quebec (TELUQ) in Montreal. His research is focused on software performance and data engineering. He is a techno-optimist and a free-speech advocate. Menu and widgets * My home page * My papers * My software Join over 12,500 email subscribers: [ ][Go!] You can follow this blog on telegram. You can find me on twitter as @lemire or on Mastodon. Search for: [ ] [Search] Support my work! I do not accept any advertisement. However, you can you can sponsor my open-source work on GitHub. Recent Posts * JSON Parsing: Intel Sapphire Rapids versus AMD Zen 4 * How fast is rolling Karp-Rabin hashing? * C23: a slightly better C * How much memory bandwidth do large Amazon instances offer? * Estimating your memory bandwidth Recent Comments * KWillets on How fast is rolling Karp-Rabin hashing? * KWillets on How fast is rolling Karp-Rabin hashing? * Daniel Lemire on How fast is rolling Karp-Rabin hashing? * GB on How fast is rolling Karp-Rabin hashing? * Jonathan on How fast is rolling Karp-Rabin hashing? Pages * A short history of technology * About me * Book recommendations * Cognitive biases * Interviews and talks * My bets * My favorite articles * My favorite quotes * My rules * Newsletter * Predictions * Privacy Policy * Recommended video games * Terms of use * Write good papers Archives Archives [Select Month ] Boring stuff * Log in * Entries feed * Comments feed * WordPress.org JSON Parsing: Intel Sapphire Rapids versus AMD Zen 4 Intel has release a new generation of server processors (Sapphire Rapids) while the latest AMD technology (Zen 4) is now broadly available. There are extensive comparisons available. Of particular interest is the open benchmark results which assess various aspects of processor speeds, including JSON parsing performance. In these benchmarks, AMD systems appear to dominate. I decided to run my own benchmarks using JSON parsing as a reference and commonly available Amazon big nodes. For these tests, I use Amazon Linux 2023 with GCC 11. I use two instances that cost about 5 dollars per hour. Amazon charges me about the same amount for both the AMD and Intel systems. The AMD instance is of type c7a.24xlarge with an AMD EPYC 9R14 processor (Zen 4 microarchitecture). The Intel instance is of type c7i.metal-24xl with an Intel XeonPlatinum 8488C (Sapphire Rapids microarchitecture). I use systems with multiple cores but my benchmark is entirely single threaded. I could have optimized either system by going with systems that have fewer cores running hotter. In my case, both processors run in practice at a comparable frequency, with a slight advantage for AMD (3.5 GHz vs 3.4 GHz). The gist of the result is that neither system dominates the other one. In some benchmarks, Intel wins, in others AMD wins. It is very closely matched. Intel results: simdjson simdjson yyjson rapidjson nlohmann Boost On-Demand DOM /json JSON json2msgpack 3.68 GB/s 2.67 GB/ 1.72 0.71 GB/s 0.03 GB/ 0.42 s GB/s s GB/s partial_tweets 6.83 GB/s 4.77 GB/ 2.41 0.77 GB/s 0.13 GB/ 0.50 s GB/s s GB/s distinct_user_id 6.99 GB/s 4.90 GB/ 2.52 0.67 GB/s 0.14 GB/ 0.49 s GB/s s GB/s kostya 2.92 GB/s 2.03 GB/ 0.83 0.80 GB/s 0.12 GB/ 0.47 s GB/s s GB/s AMD results: simdjson simdjson yyjson rapidjson nlohmann Boost On-Demand DOM /json JSON json2msgpack 3.09 GB/s 2.45 GB/ 1.93 0.68 GB/s 0.03 GB/ 0.38 s GB/s s GB/s partial_tweets 6.84 GB/s 4.22 GB/ 2.64 0.77 GB/s 0.12 GB/ 0.46 s GB/s s GB/s distinct_user_id 6.94 GB/s 4.26 GB/ 2.58 0.77 GB/s 0.13 GB/ 0.47 s GB/s s GB/s kostya 4.03 GB/s 2.71 GB/ 1.00 0.78 GB/s 0.12 GB/ 0.52 s GB/s s GB/s You can reproduce my results by grabbing simdjson and running bench_ondemand. I do not pretend that this single data point is sufficient to make purchasing decisions or to assess the Intel and AMD technology. Take it as a data point. Further reading. On-demand JSON: A better way to parse documents?, Software: Practice and Experience (to appear) Published by [2ca999] Daniel Lemire A computer science professor at the University of Quebec (TELUQ). View all posts by Daniel Lemire Posted on February 9, 2024February 9, 2024Author Daniel Lemire Categories Leave a Reply Cancel reply Your email address will not be published. To create code blocks or other preformatted text, indent by four spaces: This will be displayed in a monospaced font. The first four spaces will be stripped off, but all other whitespace will be preserved. Markdown is turned off in code blocks: [This is not a link](http://example.com) To create not a block, but an inline code span, use backticks: Here is some inline `code`. For more help see http://daringfireball.net/projects/markdown/syntax [ ] [ ] [ ] [ ] [ ] [ ] [ ] Comment * [ ] Name * [ ] Email * [ ] Website [ ] [ ] Save my name, email, and website in this browser for the next time I comment. Receive Email Notifications? [no, do not subscribe ] [instantly ] Or, you can subscribe without commenting. [Post Comment] [ ] [ ] [ ] [ ] [ ] [ ] [ ] D[ ] You may subscribe to this blog by email. Post navigation Previous Previous post: How fast is rolling Karp-Rabin hashing? Terms of use Proudly powered by WordPress