4 ms·
I was at the talk in question. Some more context: Bignums "contaminate" surrounding operations. Adding a long and a bignum yields a bignum. Seeding an equat
by prospero 16y ago
I was at the talk in question. Some more context:
Bignums "contaminate" surrounding operations. Adding a long and a bignum yields a bignum. Seeding an equation with a single bignum (42N is a bignum representation of 42) will prevent overflow.
No one has come forward with a single real-world scenario where they're using bignums in Clojure. Choosing a default that is only theoretically useful rather than a 10x performance improvement seems a bit silly.
In any situation where the compiler cannot be sure you're using primitives everywhere, it will emit non-overflowing bytecode.
By my measure, there's nothing premature about this optimization. In Rich Hickey's words, Clojure is a replacement for Java, not Ruby. Giving up Java-like performance makes the language quantitatively less useful.
- herdrick 16y agoThat Clojure's target is to replace slow old Ruby (actually that never happens, rather a successful language gains dominance in some niche and spreads from there) is only more evidence that it isn't worth breaking the abstraction called "numbers" to get merely an order of magnitude better performance. Seriously, I almost can't believe this is still an open issue in 2010. And Rich Hickey, who has designed such a great language otherwise, is on the wrong side of it? I'm boggled. EDIT: If peregrine's comment is right, then we're arguing about something that isn't happening. I hope so.