kizilsakal

kizilsakal

Advent of Code with OTP 24

Please warn me if I got something wrong :grinning_face_with_smiling_eyes:

I did some shallow benchmarking on the first day of AoC and couldn’t believe the performance difference.

erlang 22.3.4.4
elixir 1.10.2-otp-22

Q1 ran 1000 times with an average of 0.15918899999999975ms
Q2 ran 1000 times with an average of 0.47954400000000347ms

erlang 23.2.3
elixir 1.11.3-otp-23

Q1 ran 1000 times with an average of 0.13871999999999998ms
Q2 ran 1000 times with an average of 0.42693799999999826ms

erlang 24.1.7
elixir 1.12.3-otp-24

Q1 ran 1000 times with an average of 0.05861299999999995ms
Q2 ran 1000 times with an average of 0.09286299999999992ms

Here’s my runner if anyone is interested. You can run benchmarks with passing -b arg like elixir challenges/2021/01.exs -b 1000 (AoC spoilers in repo)

Most Liked

josevalim

josevalim

Creator of Elixir

Yeah, that’s the JIT and it is awesome. It won’t make everything 2x or 3x faster, but that speed up is also not unheard of. :slight_smile:

kokolegorille

kokolegorille

You might like the explanation of @garazdawi

Where Next?

Popular in Discussions Top

100phlecs
Are there any downsides, like perf issues, to putting all functional components in CoreComponents as long as you prefix it with the conte...
New
jeramyRR
This is an interesting article to read. Elixir’s performance, like usual, is excellent. However, it seems like the high CPU usage is co...
New
nunobernardes99
Hi there Elixir friends :vulcan_salute: In a recent task I was on, I needed to check in two dates which of them is the maximum and which...
New
IVR
Hi all, I’ve seen a number of related threads in the past, but I’d still be very curious to hear an up-to-date opinion on this topic. I...
New
hazardfn
I suppose this question is effectively hackney vs. ibrowse but we are at a point in our project where we have to make a choice between th...
New
RudManusachi
What configs will make sense to put to runtime.exs? – A bit of how I configure apps: I have generic configs in config/config.exs, dev...
New
pdgonzalez872
If this has been asked here before, please point me to where it was asked as I didn’t find it when I searched the forum. Maybe a mailing ...
New
dogweather
I wrote this comment on r/haskell, and it’s not popular there. :wink: But I think I’m on to something… Haskell reminds me of Java, and e...
New
Fl4m3Ph03n1x
Background A few days ago I was listening to The future of Elixir from Elixir Talks, with Dave Thomas (@pragdave ) and Brian Mitchell. I...
New
slashdotdash
Phoenix Live View is now publicly available on GitHub. Here’s Chris McCord’s tweet announcing making it public.
New

Other popular topics Top

mcarvalho
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
New
greenz1
I have a phoenix application from which a user can download multiple(5-6) files of size 1MB. I couldn’t find anything related to sending ...
New
johnnyicon
Hi all, I’ve just started learning Elixir and Phoenix Framework, so please pardon my n00bness at this stage. I’m trying to use Postgres...
New
aalberti333
As the title describes, I’m trying to run Enum.map() over a list of key/value pairs, where the value is a map. My data looks like this: ...
New
grych
Hi folks, Few months ago I have announced the proof-of-concept of the library to manipulate the browsers DOM objects directly from Elixi...
639 52774 488
New
dblack
I’ve got an issue with an app and I’ve no idea of how to troubleshoot it. I’m hoping someone here might have seen something similar. I p...
New
shijith.k
I am trying to start a new phoenix project with elixir 1.9, but mix phx.new does not work. It says that ** (Mix) The task "phx.new" could...
New
joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 records...
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
vegabook
I’m brand new to Phoenix and I have stripped one of the demo applications to the bone. I just want to get an svg up on the screen. Here i...
New

We're in Beta

About us Mission Statement