MarcinKasprowicz
What I genuinely value at my workplace is that I can easily explore new languages through internal mobility. Throughout my career within Schibsted, I have been building things with JavaScript, TypeScript, Go, Kotlin, and recently Elixir…
Trending in Blog Posts
I am seeing a lot of aplications of Argumentum ad Vericundiam in software discussions. They do link some piece of writing and point us to...
New
Hey folks,
I just published a post about Hologram’s funding and where the project goes next - the short version:
Curiosum as Main Spons...
New
A while back, I had to process millions of database updates in a legacy system that was already hitting its 64 GB RAM limit, so scaling t...
New
At the heart of every Phoenix application is the often “invisible” HTTP server layer.
For over a decade Cowboy has served the community ...
New
I recently figured out how to the the Rust hotpath profiling crate running in an elixir benchmark script (for profiling NIFs). I had some...
New
The Phoenix framework is notorious for its long term stability and dependability. Unlike most comparable projects, the Phoenix team activ...
New
I’ve published Part 3 of my Elixir distributed systems learning series.
This part explores process monitoring using the low-level primit...
New
Other Trending Topics
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
New
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve.
They are GUI (Emerge) and State management (S...
New
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
There are three potential reasons for members of this forum to have a look at https://vutuv.de
You are tired or annoyed of LinkedIn.
Yo...
New
ICal is a library for interacting with iCalendar data. It parses iCalendars into typed Elixir structs via ICal.from_ics, and can prepare ...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #blog-post
- #ai
- #phoenix_html
- #elixirconf-us
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming










Showing Posts 1 to 6- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
Sebb
maybe I’m missing the point, but
and if reverse is the point and you do not want to use stdlib
Also, you should check you code, as it is not correct.
Elixir has the great
ExUnitandmix test.tcoopman
@Sebb your solution has a downside in that it’s going to be slow on larger inputs.
You’re appending to a list which becomes expensive on big lists
Sebb
Sure, if you want speed use
Enum.But I do not think my solution would be slower, because of the
Enum.at.But memory usage will be bad with my solution.
This will be way better:
Eiji
Unfortunately that’s not true, but I like your dreams.
Enumwas added to provide generic API for everyEnumerable. If I’m not wrong some optimizations were even rejected onGitHub. Even ifEnumwould have every optimization there is still one extra call forEnumerableimplementation. Since the post is forElixirnewbies we should avoid going this topic too long.In mentioned post I have added a comment with both
reduceandfastimplementations. If we want to do it really fast we should only use pattern matching and recursion, for example:Edit: Oh, for those newbies confused with too many solutions I would recommend to give benchee a try. With just few lines we can determine which solutions is faster.
stevensonmt
Nice article, but you might want to edit this:
which is just not quite true. You probably meant something more like
Sebb
It will at least be magnitudes faster than the version provided in the article and my recursive version. Hopefully also significantly faster than the tail-recursive
reverse2… or is it?I’ll look into those with Benchee as you suggested.