"dsimcha" <[email protected]> wrote in message news:[email protected]... > == Quote from retard ([email protected])'s article >> Tue, 02 Mar 2010 14:17:12 -0500, Nick Sabalausky wrote: >> > "retard" <[email protected]> wrote in message >> > news:[email protected]... >> >> >> >> 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. >
I'd think that kind of branching could be done automatically by a reasonably intelligent optimizer. Or there's the possibility of compiling-upon-installation that could just detect the CPU being used (although that admittedly comes with a few difficulties and potential issues). I guess I was only assuming that retard was suggesting requiring > SSE2. I'm not sure if he really did mean it that way. > At the bottom end, who the heck still uses machines that don't support > SSE2? My Linux box is an AMD without SSE2. > You have to draw the line > somewhere or we'd all be tweaking our programs to fit in 640k of address > space. Certainly true.
