[plt-dev] flvector

From: Noel Welsh (noelwelsh at gmail.com)
Date: Mon Dec 21 10:44:51 EST 2009

On Sat, Dec 19, 2009 at 2:54 PM, Matthew Flatt <mflatt at cs.utah.edu> wrote:
> I can see the use for many flavors of vectors when dealing with foreign
> libraries. But is there another reason to bother with "signed 16-bit
> integer" instead of just using exact integers?

I think arrays of doubles are by far the most common requirement,
followed by arrays of ints, then distantly followed by floats, 16-bit
ints and bytes in that order.

Floats are used in e.g. games where speed is more important than
accuracy. You can push twice as many floats than doubles through a
SIMD unit so processing is faster. Memory bandwidth requirements are
lower which is another plus.

DSP people sometimes deal with audio as 16-bit ints (but sometimes
floats or 32-bit ints to prevent overflow).

I can't think of many numeric computing requirements for bytes, but
I'm sure crypto applications use them.

That's my biased opinion.


Posted on the dev mailing list.