Anton Prokhorov
hollandseuil.bsky.social
Anton Prokhorov
@hollandseuil.bsky.social
Software Engineer at JetBrains
Work on Amper
Was born in Siberia, live in Amsterdam
Also it worth to note, that there are no as fast purely functional programming languages as you probably imagine in your reality not because there is some magical limitation on representation of the CPU (modern imperative langs don't comply long ago), but because it's quite hard to write on FP langs
April 11, 2025 at 6:02 PM
Profile-based optimization can make local optimizations in a very restricted use cases with aggressive invalidation, though, but in the most cases it works solid and skyrocket your performance like god

And this is where F# beats your Rust or whatever you consider as fast
April 11, 2025 at 5:57 PM
If you write anything on "performant" languages, you probably gonna end up with a worse performance than undergraduate would have written the same code in Java

You very underestimated all the science which lies under VMs

Jit has benefit of having traces at the runtime
April 11, 2025 at 5:57 PM
Look at the BEAM VM, btw Erlang is faster than Python for instance, or take a look at F# it has comparable speed with C# (they run on the same VM and translates to approx similar instructions)

The problem with FP is not performance and never has been
April 11, 2025 at 5:46 PM
I completely can't buy that: it's an a abstraction layer, it shouln't somehow follow how CPU works, we can translate the code whatever we want, there is no problem with that

We also could write the whole runtime, which would know how to execute functional command the most effective way
April 11, 2025 at 5:46 PM
The closest programming language that does that is Haskell. It's not C-like completely, it's statically typed though and very concise and expressive.

This is exactly where FP shines. Also, if transactional memory is introduced, you can semi-automatically parallelize some little things
April 11, 2025 at 3:37 PM
You have to make sure that the functions you're calling are side-effect free, and then compiler actually can infer the execution graph itself, however, in real life, it's 1. very hard problem to verify that your function is actually pure, 2. parallelization isn't free, if using wrong could slow down
April 11, 2025 at 3:37 PM
Europapa, europapa!!! Welkom in Europa. Blijf hier tot ik dood ga
April 10, 2025 at 10:47 PM