21
you are viewing a single comment's thread
view the rest of the comments
[-] HaraldKi@nrw.social 4 points 4 months ago

@argv_minus_one @codeinabox

This is utter nonsense, except you proof with serious performance measurements that
- the extra function is slower
- this actually matters

[-] argv_minus_one@mastodon.sdf.org 3 points 4 months ago

@HaraldKi

I am admittedly a bit…emotional about not wasting memory. Growing up on a 486 with 4MB of RAM does that to you, I guess.

The extra function will only be slower if the compiler/interpreter doesn't inline it, which most compilers/interpreters including JavaScript will, so it's mostly just a memory-usage issue. But I have used rather simple interpreters that *don't* inline functions, and one of them even came with a warning that function calls are slow!

@codeinabox

[-] HaraldKi@nrw.social 2 points 4 months ago

@argv_minus_one @codeinabox

Well, well, with JavaScript I think browser snd bloated web sites, where a good hand crafted extra function is the smallest if our problems.🤣

this post was submitted on 29 Apr 2026
21 points (95.7% liked)

Programming

28304 readers
591 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 3 years ago
MODERATORS