coby
Hi Everyone!
First time writer, long time reader here.
I’ve been using Elixir for the past two years or so, and I’ve noticed that every single JSON library has it’s own benchmarks, that all say that they are the best. I wanted to know which one was the fastest currently, so I decided to build my own benchmarks. I’d love inputs from everyone to see what people think!
To see the benchmarks, you can look here, under the outputs folder: Elixir Random Benchmarks
That repo also contains various benchmarks of Elixir core that I’ve used to find the fastest versions of different functionalities in the core Elixir language.
Trending in Discussions
As the title says, please share what you’ve been up to with Elixir. Whether that’s been learning it, looking into it, making stuff with i...
New
Hey there,
It’s been more than a year since we started using LiveView as our main UI library and building a whole library of UI componen...
New
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Quite interesting article Google brought me. Didn’t find any mentions about it here.
What do you think in general? Would you use togethe...
New
Hi everyone!
The first release candidate for the Expert language server project is now available!
We’ve published a press release detai...
New
Since we have deprecated our Erlang sections (as we have dedicated Erlang Forums now) let’s add this thread for those who’d like to post ...
New
:warning: Security advisory: Decimal DoS vulnerability
A vulnerability has been published for decimal where very large exponents can cau...
New
Other Trending Topics
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
Hi there! We created Gust: A task orchestrator inspired by Airflow.
For those who have never heard about Aiflow, it’s a Python-based wor...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself.
My main conc...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixirconf-us
- #ai
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #hex
- #security










Showing Posts 1 to 10- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
dimitarvp
As far as I’m aware, using
Jasonis the conventional wisdom in the Elixir circles for a while now.keathley
In most benchmarks Jiffy tends to be the fastest of the well known libraries. Jason is slower but has more use throughout the community and its pure elixir. We use a combination of jiffy and jason at work and benchmark against our specific payloads.
coby
That’s what I ended up seeing in the benchmarks.
One of my side projects right now is building a web server that can get faster performance than cowboy (I know, it’s a pipe dream). Part of that was choosing the fastest JSON parser, and when I went exploring the popular libraries, I saw that in every benchmark there were wildly different results, each favoring whichever library I was looking at, so I made my own little benchmark to see which was the fastest.
coby
I know that Jason is the current standard, I use it when I use Plug or Phoenix, it’s one of my favorite libraries.
This was just a quick side project of mine to get a more definitive benchmark, since every library typically advertises the benchmarks that show their library to be the best, and I wanted to know which one was without any bias.
dtip
I’m curious - why is Jason the standard choice when jiffy has been around for ages (i.e. it’s stable and well-tested) and is much faster?
dimitarvp
I can’t speak for @michalmuskala (the creator) but IMO the selling point is that it’s pure Elixir and has no native dependency. And that it’s stricter.
Especially if you deploy to various Docker and VPS configurations this can be a life saver since some VMs and hosting providers can be finicky when compiling native code. Not having to deal with various GCC / clang versions and distro-specific patches can make a huge difference.
keathley
Getting jiffy to compile isn’t hard. Shimming it into all of the existing libraries is more challenging.
dimitarvp
Agreed, I am not saying it’s always hard, I am only saying that not using it gets you rid of one more potential deployment problem that will bite you just at the right night at 2:00 AM.
As a guy who usually works without devops and sysadmins around, I appreciate this a lot. Other people’s workflows vary of course.
coby
It’s the same question I had, especially after my benchmarks. Jiffy has such a massive performance boost here that it just makes sense to use it. And it’s not like it’s an unknown library, it’s been established for a while as THE library in Erlang.
For my own uses I simply wrote a little Elixir wrapper around Jiffy so that I can make it look more Elixir-y, and still use Jiffy. It makes it a little easier to use Jiffy, which at the end of the day really isn’t that difficult.
coby
Out of curiosity, what kind of deployments have you done where libraries that use NIFs are problematic?
My company has a few Elixir services in production, and they use some Erlang libraries and some NIFs as well, and we’ve never had any issues in deployments using Docker.
I feel like this might come off as mean, and I want to stress that I am not trying to be mean, this is genuine curiosity because I want to know if I might run into these issues in the future.