Implement the "unum" representation in D ?
jerro
jkrempus at gmail.com
Thu Feb 20 13:30:04 PST 2014
> Regarding the variable length of his FP numbers, their energy
> savings are beer-based numbers, I don't think they have any
> experimental basis (yet).
Also, because they are variable sized, you need to access them
through pointers if you want random access. Now you are reading
both the pointer and the value from memory. Since pointers and
double precision floats have the same size on modern hardware,
one would expect this to actually consume more energy than just
reading a double precision value. An additional indirection can
also have great performance cost. And there's one more step you
need to do. After getting the pointer you need to first read the
utag so you can decide how many bytes to read.
So where you would normally just read the value, you now need to
read the pointer, use that to read the utag and use the utag to
read the value.
More information about the Digitalmars-d
mailing list