aseigo

aseigo

Exploring Elixir E2: How fast is Elixir 1.5?

Elixir1.5.0-rc0 and OTP 20 are significant releases, full of features, bug fixes and optimizations. I was really curious as to how the optimizations listed in the release notes actually stacked up, so I bechmarked a few of them. This screencast shows the results of bechmarking pattern matching of maps, ets table creation, and ets insertion/lookup with Elixir 1.5 on OTP 20 vs Elixir 1.4 on OTP 18.

The results are extremely encouraging, and as a result of these measurements I can hardly wait to move all my projects to Elixir 1.5 / OTP 20.

All the usual caveats about benchmarks apply here, but as a comparison between the two versions I think it is a valid set of measuremnts as they were run on the same hardware and OS on an as-quiet-as-I-could-reasonably-make-my-laptop … not optimal conditions, but good enough to tease useful comparison numbers out of it.

For those curious, I benchmarked it on a i7-4500U laptop with 8GB RAM and a 256GB SSD drive. YMMV.

p.s. I had wanted to post the new episode on the weekend, but realized after making a first revision of the video that it was just simply too long and covered too much … as a result I ended up splitting the video into two parts, and there will be an “Extra” screencast coming in a bit that covers quite a few of the feature improvements in Elixir 1.5 w/OTP 20 … but that meant the upload was delayed until today … meh. Who needs schedules? :wink:

Most Liked

aseigo

aseigo

Yeah, responding to yourself is lame … but here I am anyways :wink:

Code repository that goes with this series can be found here: https://github.com/aseigo/exploring-elixir

Note that it is not a “coherent application” but rather all the snippets and bits I use in the episodes (including some that get left on the cutting room floor … ), but someone on reddit asked so there it is.

Also, the Extras episode noting a number of highlight features from Elixir 1.5 / OTP 20 is up as well:

13
Post #2
aseigo

aseigo

I actually agree that blog posts are better for archival and more “serious” reading. Thankfully there are a number of those for Elixir already … though perhaps I will also do one of those one day (I used to blog nearly daily for other projects I participated in) …

BUT … videos have a few benefits: they show visually what is happening and how it can come together in more or less real-time, something that is hard to replicate with a blog. Videos are also something to sit and consume almost casually, and as such they compliment and augment the written word with something a bit more like entertainment. There’s also something to be said about the “touch” of the human voice … for some people it’s more enjoyable …

So I think we need ALL of these forms of media to communicate the great things we love in Elixir and the BEAM ecosystem …

BTW … The next episode will be back to “live coding” again, which is also really hard to replicate in blog entry …

sztosz

sztosz

I would really like to read about that performance comparison. When something is written I can skim it to see if it’s worthwhile my time. With videos… i don’t even bother. My experience with videos is that most of the time a 5 min content is dragged on for way to much time. And you neither can skim a video, nor get back easily to a particular moment that’s interesting. When it comes to programming, videos are good for… wait they’re not good for anything :frowning:

Update. I just read it again, and want to clarify one thing. It’s not that I am attacking you. Or that I cant appreciate someones work, just because it’s video, it’s not like that at all. It’s just that I’d much rather read a chunk of text, than watch a video (unless it’s a TV show or smth :wink: ). And I believe there are more people people like me and thats why I believe you would find at least few readers (if not many) for your blog if articles would be about interesting topics. :slight_smile:

Oh I always loved those ASCII casts :thumbsup: I really makes you think, that the creator value reader/watcher time, which is very rare.

AstonJ

AstonJ

Noooooooooo… screencasts are awesome @thousandsofthem :lol:

@aseigo and what he’s doing reminds me very much of Ryan Bates and Railscasts :003:

Best of both worlds would be to have show notes or asciicasts (like Railscasts did).

michalmuskala

michalmuskala

There’s one more optimisation that is missing from the videos - record pattern matching (or rather pattern matching on tuples where the first element is an atom) was also optimised. This also applies to ok and error tuples, so should be also visible in Elixir. I’m not sure how big of an improvement it is, though.

Where Next?

Popular in Screencasts Top

ElixirCasts
I made a video to help people get introduced to agents.
New
AlchemistCamp
https://alchemist.camp/episodes/word-count I’ve just made a new version of of Lesson 2 from Alchemist Camp. It has significantly larger ...
New
SmartLogic
We at SmartLogic have been running an intermittent series of live coding sessions on Twitch that we then archive on YouTube; in the lates...
New
sevensidedmarble
New video on LiveView for almost total beginner level: Hopefully this is a helpful starting point for someone out there!
New
ElixirCasts
Made a video about introspecting Ecto Schemas. https://elixircasts.io/introspecting-ecto-schemas Posted via Devtalk (see this thread ...
New
aseigo
New video covering, at least in brief, the current date and time APIs in Elixir. I do hope that more of Calendar / Timex are pulled i...
New
AlchemistCamp
https://alchemist.camp/episodes/guessing-game I’ve recently re-recorded Lesson 1 from Alchemist Camp. It’s significantly higher quality ...
New
ElixirCasts
I made an episode showing how you can use Phoenix.Controller.action_fallback/1 to make simpler, more readable controllers. https://elixi...
New
ElixirCasts
I made an episode exploring Phoenix assigns: https://elixircasts.io/exploring-phoenix-assigns
New
joebew42
Hello :wave: This is a follow up for the https://forum.elixirforum.net/t/good-elixir-tdd-resources/17482 thread. It was my intention t...
New

Other popular topics Top

JDanielMartinez
Hi! May someone helps me, please! I have two apps into an umbrella project: the first one is Database, which manages queries, and the se...
New
sergio
In Ruby, I can go: User.find_by(email: "foobar@email.com").update(email: "hello@email.com") How can I do something similar in Elixir? ...
New
gshaw
What is the idiomatic way of matching for not nil in Elixir? E.g., First way: defp halt_if_not_signed_in(conn, signed_in_account) when...
New
jerry
Good day to you all. I have been struggling to get a query involving like and ilike to work. Can anyone assist me on this, please? pro...
New
lk-geimfari
What is most correct way to open, read and parse JSON file with poison? For example if we have example.json file in root of some projec...
New
chrismccord
As promised, the first release candidate of Phoenix 1.3.0 is out! This release focuses on code generators with improved project structure...
New
myronmarston
The Elixir Typespec docs show the following syntax for keyword lists in typespecs: # ... | [key: type] # keyword lis...
New
rms.mrcs
Hi, I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list....
New
TunkShif
This post is an instruction guide to help you setup your Neovim for Elixir development from scratch. It includes general information on h...
273 38985 115
New
jay1
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
New

We're in Beta

About us Mission Statement