64-bit and SSE
dsimcha
dsimcha at yahoo.com
Tue Mar 2 11:41:17 PST 2010
== Quote from retard (re at tard.com.invalid)'s article
> Tue, 02 Mar 2010 14:17:12 -0500, Nick Sabalausky wrote:
> > "retard" <re at tard.com.invalid> wrote in message
> > news:hmjmjd$15uj$1 at digitalmars.com...
> >> Tue, 02 Mar 2010 15:49:02 +0000, dsimcha wrote:
> >>
> >>> Given that Walter has indicated that 64-bit support is on the agenda
> >>> for after D2 is finished and x87 is deprecated in 64-bit mode, will we
> >>> also see SSE(2) support in DMD in the relatively near future? If so,
> >>> will it be exposed as a compiler option even when compiling in 32-bit
> >>> mode?
> >>>
> >>> I've realized that this is kind of important for me since Intel
> >>> deprecated x87 on its Core 2 and Pentium 4 chips, meaning any old
> >>> school floating point code runs painfully slow compared to, say, an
> >>> AMD chip that still has a decent x87.
> >>
> >> SSE(2) ? Don't people already use SSE 4.2 and prepare for AVX?
> >
> > Yes. The ones who enjoy arbitrarily shrinking their potential user base.
> Why not dynamic code path selection:
> if (cpu_capabilities && SSE4_2)
> run_fast_method();
> else if (cpu_capabilities && SSE2)
> run_medium_fast_method();
> else
> run_slow_method();
> One could also use higher level design patterns like abstract factories
> here.
Two reasons: At the top end it's more trouble than it's worth unless the code is
**really** performance critical, and a lot of code with really performance
critical floating point is scientific computing code that may only have to run on
one arch anyhow.
At the bottom end, who the heck still uses machines that don't support SSE2? I
agree with Nick to some degree that developers shouldn't assume their audiences
have the latest and greatest, but SSE2 has been supported by AMD for about 7 years
and Intel for about 9. I'm pretty sure that's at least a few standard deviations
longer than the average lifetime of computer equipment. You have to draw the line
somewhere or we'd all be tweaking our programs to fit in 640k of address space.
More information about the Digitalmars-d
mailing list