Was just catching up on the 1.3 announcement. I’m ...
# announcements
t
Was just catching up on the 1.3 announcement. I’m very excited about the unsigned ints stuff. I do a bit of protocol work. But I’m curious how they implement that on top of the JVM which does NOT have unsigned ints. Does anyone know? Are there performance implications?
d
There are no performance implications. Except for division but even that is minimal.
k
They're implemented with inline classes, so no overhead there, and I image a bunch of https://www.hackersdelight.org/
Copy code
internal fun uintDivide(v1: UInt, v2: UInt): UInt = (v1.toLong() / v2.toLong()).toUInt()
damm that's lame.