Hacker News new | ask | show | jobs
by patrakov 2 days ago
And this is exactly the source of the disagreement. For an arbitrary large integer not fitting in a single register, returning it in fresh storage must copy all its bytes. That's why it cannot be O(1).
1 comments

How are you passing my function the integer in the first place? Presumably if it's this large, you're using some sort of reference, so I can just give it back to you.