How is the performance of Elixir for blockchain apps?

I am try to learning elixir since 5 month, and I had a project in golang for mobile back-end for blockchain app, it had amazing performance, I am just curious about performance of elixir for blockchain apps, any idea?

Probably helps if you expand a bit what the blockchain app is (which helps understand where bottlenecks are). Its a very broad category from exchanges (where every ms matters) to web3 nft apps etc.

1 Like

any kind of blockchain apps I mean.

As @victorbjorklund says, it depends on what you are after. Elixir performance characteristics are pretty well documented in these forums. Examples include:

Elixir language potential evaluation (comparison with go)

Elixir is not great at heavy duty number-crunching (although, depending on what you are doing, Elixir-Nx is addressing that).

However, for things like web-apps, the templating system and process model make for very efficient, performant web-apps that stay predictably responsive under load - e.g. no “stop-the-world” garbage collection.

“Blockchain apps” is a very broad set of possible applications with wildly different performance requirements so I don’t think you’re going to get a better answer without being more specific.

4 Likes

This book might interest You…

5 Likes

@victorbjorklund @mindok @kokolegorille if you have app like dropbox and u keep data like images, videos, pdf…etc in blockchain, elixir or golang which one will be best for back-end services?

Any workload that’s I/O bound makes the used programming language almost irrelevant. Simply because I/O is the CPU waiting on periphery e.g. network and file operations.

Does it really matter if your processing code finishes in 5 or 5000 microseconds if the I/O operation inside the same function takes 250_000 microseconds? No, it doesn’t.

So your evaluation of the used programming language for this task should ask other questions like: do you need strong static typing so you can predict all errors in advance (Rust, Haskell, OCaml / F#), do you just want to work with something familiar (for many that’s Python or JavaScript), do you need a language with excellent error-handling runtime (Erlang/Elixir), how good is the community library coverage of the thing you want to do (for most people that is the ultimate deciding factor btw), and maybe others.

Only you can answer those questions. But generally, if a lot of I/O is involved, most languages are adequate, Elixir included.

1 Like