Skip to content

Comment on Writing an RPC from Scratch (2021)parent

Comments

I notice that the comment refers to sqrt(number), but never does that either. So it tests way more numbers than it needs to.

It does use sqrt(number), just not directly. Instead of taking sqrt(number), it just calculates i*i which is much faster.

D'oh, you're 100% correct!

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.