2 ms·
Wow, I learned something today; I had always thought of integer multiplication as a constant-time operation. This is why I love computer science, no matter how
by tombert 8y ago
Wow, I learned something today; I had always thought of integer multiplication as a constant-time operation.
This is why I love computer science, no matter how much I think I know, I can feel like an idiot a day later.
- pragmaticpandy 8y agoIf by integer you mean the four or so bytes that many languages use to represent a (bounded) int, then it is indeed constant. This is often the context in software engineering.
- tombert 8y agoI'm somewhat interested in compiler and computation theory, so this is why it was a surprise to me.
- davidivadavid 8y agoFor some reason, a lot of people seem to think that operations that have a low level implementation (e.g. basic instruction in some ISA) are O(1).