𝔼𝕩𝕦𝕤𝕚𝕒@lemmy.world to memes@lemmy.world · 1 month agoTrue Spaghetti codelemmy.worldimagemessage-square36fedilinkarrow-up1946arrow-down13
arrow-up1943arrow-down1imageTrue Spaghetti codelemmy.world𝔼𝕩𝕦𝕤𝕚𝕒@lemmy.world to memes@lemmy.world · 1 month agomessage-square36fedilink
minus-squarewise_pancake@lemmy.calinkfedilinkarrow-up39arrow-down1·1 month agoI have a great performance optimization for this What if instead of 1s sleep, we did 0.5s sleep? That’s a 100% improvement.
minus-squareAmanduh@lemm.eelinkfedilinkarrow-up15·1 month agoIt’s not sleeping for 1 second, $1 is an input parameter in the script
minus-squarelurch (he/him)@sh.itjust.workslinkfedilinkarrow-up0·1 month agothe idea isn’t wrong tho, as sleep can do fractions. bash cannot though. therefore it would bloat the code a bit to use bc to multiply the parameter by 0.5 or so.
I have a great performance optimization for this
What if instead of 1s sleep, we did 0.5s sleep? That’s a 100% improvement.
It’s not sleeping for 1 second, $1 is an input parameter in the script
That sounds expensive
the idea isn’t wrong tho, as sleep can do fractions. bash cannot though. therefore it would bloat the code a bit to use bc to multiply the parameter by 0.5 or so.
It isn’t what is happening though lol…