Community
cancel
Showing results for 
Search instead for 
Did you mean: 
91 Views

32bit build out-performs 64bit build on mac os x

Jump to solution
I have noticed that our 32bit builds perform better than our 64bit builds on mac osx.
I have built a test application and I am timing muliple calls to "ippsSub_32f".

The 64 bit build is almost twice as slow as the 32bit build of the exact same code.

Here is the output:

$ ./ippTest32
Time Taken: 70.199000
$ ./ippTest64
Time Taken: 112.907000
Has anybody else noticed this?

Here are the build commands:

g++ -o ippTest32.o -c -03 -I/opt/intel/Compiler/11.1/080/Frameworks/ipp/Headers -m32 ipptest.cpp g++ -o ippTest32 -L/opt/intel/Compiler/11.1/080/Frameworks/ipp/lib -lippiemerged -lippimerged -lippsemerged -lippsmerged /opt/intel/Compiler/11.1/080/Frameworks/ipp/lib/libippcore.a -m32 ippTest32.o g++ -o ippTest64.o -c -03 -I/opt/intel/Compiler/11.1/080/Frameworks/ipp/Headers ipptest.cpp g++ -o ippTest64 -L/opt/intel/Compiler/11.1/080/Frameworks/ipp/lib -lippiemerged -lippimerged -lippsemerged -lippsmerged /opt/intel/Compiler/11.1/080/Frameworks/ipp/lib/libippcore.a ippTest64.o


and the test code (the complete file is attached):

int main()

{

timeVal start, end, diff;

std::vector<float> in1,in2,out;

in1.resize(100000,1);

in2.resize(100000,2);

out.resize(100000);

start = TimeNow();

for (int j=0;j<1000;++j) {

ippsSub_32f(&in1[0],&in2[0],&out[0],out.size());

}

end = TimeNow();

diff = TimeDiff(end,start);

double diffMS = timeVal_to_Millisecs(diff);

printf("Time Taken: %f\\n",diffMS);

return 0;

}


0 Kudos
1 Solution
Chao_Y_Intel
Employee
91 Views


Hello,

It looks that the code is linking with IPP statically, but it does to call ippInit() function.

This function is required by static linkage, or it will only use non optimized code.

Check here for more information:

http://software.intel.com/en-us/articles/ipp-dispatcher-control-functions-ippinit-functions/

Thanks,

Chao

View solution in original post

2 Replies
Chao_Y_Intel
Employee
92 Views


Hello,

It looks that the code is linking with IPP statically, but it does to call ippInit() function.

This function is required by static linkage, or it will only use non optimized code.

Check here for more information:

http://software.intel.com/en-us/articles/ipp-dispatcher-control-functions-ippinit-functions/

Thanks,

Chao

View solution in original post

91 Views
Thanks Chao,

that has solved the performance issues with our application.
Interestingly, for the test app included previously, adding ippInit() appears to slow down the 32bit performance (although this does not seem to be the case for our main application which uses a large range of IPP functions).
The timings observed are as follows:

without ippInit()

32: Time Taken: 73.700000

64: Time Taken: 129.448000

with IppInit()

32: Time Taken: 107.572000

64: Time Taken: 105.004000

The processor being used is an Intel Core 2 Duo (2.4 Ghz)
Reply