ishanpage@programming.dev to Programming@programming.devEnglish · 1 year agoProgramming "with the grain"ishan.pageexternal-linkmessage-square4fedilinkarrow-up13arrow-down10
arrow-up13arrow-down1external-linkProgramming "with the grain"ishan.pageishanpage@programming.dev to Programming@programming.devEnglish · 1 year agomessage-square4fedilink
minus-squareHazzard@lemm.eelinkfedilinkEnglisharrow-up2·1 year agoEh, the python one will probably perform better, because sum is probably written in native C under the hood.
minus-squarejadero@programming.devlinkfedilinkEnglisharrow-up2·1 year agoI’ve yet to find a language where “doing it yourself” has higher performance than calling the built-in or library function. There are edge cases, but rarely enough to be bothered about.
Eh, the python one will probably perform better, because
sum
is probably written in native C under the hood.I’ve yet to find a language where “doing it yourself” has higher performance than calling the built-in or library function. There are edge cases, but rarely enough to be bothered about.