seeding the pot for 2.0 features [small vectors]
Bill Baxter
dnewsgroup at billbaxter.com
Sun Jan 28 16:38:10 PST 2007
Chad J wrote:
> Bill Baxter wrote:
>> Mikola Lysenko wrote:
>>
>>> I'll bite. Here are the two features I consider most important:
>>>
>>> 2. Low dimensional vectors as primitive types
>>>
>>> Specifically I would like to see the types int, real, float etc.
>>> extended into 2-4 dimensional vectors. ie. int2, real4, float3.
>>>
>>> This would be exceptionally useful in many applications which require
>>> coordinate geometry. Here is a very brief list:
>>>
>>> Scientific Programs
>>> Physics Simulation
>>> Computer Graphics
>>> Video Games
>>> User Interfaces
>>> Computational Geometry
>>> Robotics
>>> Fluid Simulation
>>
>>
>> It's still a tiny fraction of the number of applications that use,
>> say, strings. So the ubiquity argument for inclusion is pretty weak,
>> I think.
>>
>
> What applications don't use vector instructions?
Business applications? I'm not sure what you mean exactly. But the
question is not so much does app xyz use vector instructions, but rather
would the programmer of app xyz have benefited from having int2/3/4 or
float2/3/4 type primitives.
> Also, I think it's more important to consider what /D applications/ will
> be using SIMD instructions, rather than what applications in general do
> or do not use coordinate geometry. That's because a lot of those
> applications may not even be written in D or have anything to do with D,
> like the mass of stuff written in dynamic languages like perl, python,
> ruby, etc.
Well judging from posts around here it seems like web programming folks
and DB users make up a significant percentage of active D users. But
gamers and scientific folk are another significant group it seems.
> I have to wonder, has any language out there really given good support
> for SIMD primitives, besides assembly? I think D could stand a lot to
> gain here. That said, I don't mind if it's done in a library as long as
> it looks polished and is not cumbersome.
Agreed.
--bb
More information about the Digitalmars-d
mailing list