this post was submitted on 28 Oct 2023
106 points (94.9% liked)

Programmer Humor

32361 readers
267 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 

2020 study pdf.

After seeing this a couple years ago I started to be more responsible for my PHP code, writing it even with the slightest micro-optimizations possible, since more times people use my code (especially due to nature of PHP being executed in every http request), more energicity they waste because of my lazyness and more they pollute the planet. JIT was NOT included in this experiment, so the number can be much more lower.

I hope you will be responsible for your code so on too (generally I mean people using interpreted languages).

you are viewing a single comment's thread
view the rest of the comments
[โ€“] [email protected] 3 points 1 year ago (1 children)

Pascal is a simpler and more limited language, so it's not entirely surprising. It also has less and smaller standard libraries to link in.

As to C# and F#, what's wrong with the difference? The functional coding style of F# prefers immutable data over possibly mutable ones in C# and that requires more allocations and garbage collection.

[โ€“] [email protected] 1 points 1 year ago

I haven't looked into the details of the actual code, but I would expect the compiler optimizations and JIT to figure it all out and end up with very similar native code. Especially since both languages are mature and had enough time to reach such goals. But it's quite possible my assumptions are incorrect.