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

> Edit: Also, technically reddit was using signed int32s. So they really only had 2^16 unique digits. If they used unsigned int32s, then that would have bought them a lot of time.

Signed integers have 2^31 positive values (well, just about). It doesn't take 16 bits to store the negative sign :-)




Not for most implementations, a signed 32 bit int goes from ~-2 billion to ~+2 billion, an unsigned from 0 to ~4 billion


That isn't disagreeing? It is half the numbers. But that is just minus one exponent.

Right?


The GP said it would have "bought Reddit a lot of time," the post I responded to said it was merely 2^31 implying that it wouldn't have bought them a lot of time, that's the part I was replying to (though I didn't word it clearly). 2 billion more values would have bought Reddit a lot of time.

I should have taken more time to read over both posts and respond more clearly though


Ah, I read the GP as a correction that it wasn't 2^16, but 2^31 values. The "doubling" was correctly stated, but the edit said they only had 2^16 values to work with. Almost certainly just a mistake in the post.


Yeah I think we're all in agreement here.


For most implementations 2^31 is ~2 billion.




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

Search: