Hacker News new | past | comments | ask | show | jobs | submit login

> However, you shouldn't be passing million-digit numbers around as (decimal) text

This is about numbers that are thousands of digits, not millions. Regardless, why not? What's the alternative that supports easy exchange? If you stick it in some hexified representation, you still have to parse text, and put it into some non-machine-native number container. It's going to be slow no matter what.




No, it's not going to be slow no matter what. Didn't you see my example? The hexadecimal non-machine-native textual representation was 4000 times faster than the decimal ditto. On a number that was much larger, I might add.

Hex number parsing is linear time.


I could imagine people overlooking that little "m" in your example's output!


Indeed I did!


you can convert hex into binary directly without any multiplications




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: