Sign in to follow this  
Fire Lancer

Using libraries with optimised SSE versions without separate builds?

Recommended Posts

Several libraries I use (mainly low level image and audio loading libraries) provide SSE and SSE2 optimised versions. My program needs to run on some lower-end and/or old systems, where these are not available. However id like to take advantage of these optimised builds, as they have in my tests greatly reduced the time taken for my application to load resources. I have a way to determine if the CPU supports SSE and SSE2 (little bit of ASM with the cpuid instruction), so I'm thinking the way to go is use the DLL versions of these libraries, and then load the most optimised version supported. The problem is I really don't want to write the code to declare function pointers for and manually load in like 1000 functions with GetProcAddress. Is there some way to still have the compiler handle the code for loading the dll, while still being able to pick which one exactly to load at run time, since apart from the LoadLibrary bit its exactly the same as the normal and SSE optimised builds export exactly the same interface?

Share this post


Link to post
Share on other sites
This is a non-solution, but do keep in mind that computers that don't support sse haven't been made in almost 10 years. Do you intend for your clients to use pentium 2 processors? Are your clients running 400 mhz computers?

I know you said "Some older computers" but I find it difficult to believe you can actually find a functional pentium 3 that is in mainstream use, especially for someone who is using it for gaming, and the pentium 3 DOES support sse1. In order to need the non sse versions, you'd have to find someone using a pII or less to game on. sse2 requires a p4, but again, p4 was mainstream almost 9 years ago. Do you really know any "gamers" running less than a p4?

In my opinion, whatever solution you end up coming up with will be a heck of a lot of work to support the 4 people with a pII.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this