News for hackers. Stuff that matters.
Re:N-Params vs. Single Param by dicytea on Thursday April 17, 2025 @03:43PM (#43721279)
Doesn't seem to be a problem, at least for Rust: https://godbolt.org/z/fToxz3d7a.

Functions with plain arguments and a struct both produce identical assembly output.

Re:N-Params vs. Single Param by airstrike on Thursday April 17, 2025 @04:03PM (#43721545)
Also worth noting clippy will warn about writing functions with too many arguments for the same reason listed in TFA

https://rust-lang.github.io/rust-clippy/master/index.html#to...

Re:N-Params vs. Single Param by carlos-menezes on Thursday April 17, 2025 @03:54PM (#43721415)
Re:N-Params vs. Single Param by hwpythonner on Thursday April 17, 2025 @04:20PM (#43721777)
Try compiling with optimizations. I think by default this site doesn't add optimization flags.

Here what happens with optimizations: https://godbolt.org/z/G18zd7chP

Look at the registers usages vs stack

Re:N-Params vs. Single Param by carlos-menezes on Thursday April 17, 2025 @04:25PM (#43721818)
Got it! Thanks for the link.
Re:N-Params vs. Single Param by physicsguy on Thursday April 17, 2025 @03:57PM (#43721470)
If you add a third argument you get different assembly