• 0 Posts
  • 9 Comments
Joined 2 years ago
cake
Cake day: July 1st, 2023

help-circle


  • Giooschi@lemmy.worldtoRust Programming@lemmy.mlWhich is faster?
    link
    fedilink
    English
    arrow-up
    3
    ·
    edit-2
    7 days ago

    let statements only reserves space on the stack

    It is not guaranteed to do that. It could also use a register or be optimized out completly (like in the example you posted in the other comment).

    The stack pointer is also not changed for each local variable, but instead for each function call, so it wouldn’t make a difference anyway.






  • Giooschi@lemmy.worldtoLinux@lemmy.ml$HOME, Not So Sweet $HOME
    link
    fedilink
    English
    arrow-up
    3
    arrow-down
    4
    ·
    17 days ago

    I hate all the cruft in my home directory, but I also hate when stuff suddently stop working after an update, or when all the documentation online talks about something that doesn’t work on my system or is not there anymore. Developers are the ones that will have to deal with people with these issues, so I can see why they are reluctant to implement the naive solutions that some ask for.