News for hackers. Stuff that matters.
Re:Fast midpoint between two integers without overflow by PaulHoule on Wednesday December 07, 2022 @02:31PM (#33899044)
Many dynamic languages (e.g. Python, Clojure) do some variation of promoting numbers to larger types, usually not in small increments (keeping track of how many bits the number is probably adds an unreasonable overhead) but in large increments and ultimately promoting to an arbitrary precision int, a rational, or a BigDecimal. The people I know who are messing around with 5-bit ints and other irregular types are doing it with FPGAs where it unambiguously saves resources as opposed to costing them.

There are no comments on this comment yet.