Plots icon indicating copy to clipboard operation
Plots copied to clipboard

Feature request: Bit manipulation

Open Winterhuman opened this issue 1 year ago • 0 comments

A bit of a niche request (pun not intended), however, I think it'd be a useful feature for visualising how bit-based approaches differ to their "unoptimised" counterparts (e.g. The fast inverse square root algorithm).

There's a lot of further questions which greatly complicate this feature request:

  1. How many bits are integers assumed to use?
    • Should there be a function for this, like bits(x, 4) for translating a given value of x into 4 bits, or a hardcoded value such as 32 bits? Or maybe a setting?
  2. Are only integers allowed, with everything else being floored?
    • If not, what kind of floating point number scheme would be used? Similarly, should "longs" be considered?
  3. Thinking back to the Quake optimisation linked above, should the 0x... syntax be included?

I doubt there's a reasonable way to cover everything mentioned here, since this issue is essentially asking for an entirely new syntax system alongside the existing one, but let me know what you think.

Winterhuman avatar Jul 18 '24 20:07 Winterhuman