cm0002@lemmy.world to Programmer Humor@programming.dev · 4 个月前Infallible Codefeddit.ukimagemessage-square57fedilinkarrow-up1301arrow-down118
arrow-up1283arrow-down1imageInfallible Codefeddit.ukcm0002@lemmy.world to Programmer Humor@programming.dev · 4 个月前message-square57fedilink
minus-squareprime_number_314159@lemmy.worldlinkfedilinkarrow-up3·4 个月前If small numbers are much more frequent, it’s better to return early. Really, you should gather statistics about the numbers the function is called with, and put the most frequent ones at the top.
If small numbers are much more frequent, it’s better to return early. Really, you should gather statistics about the numbers the function is called with, and put the most frequent ones at the top.