• C++ Programming for Financial Engineering
    Highly recommended by thousands of MFE students. Covers essential C++ topics with applications to financial engineering. Learn more Join!
    Python for Finance with Intro to Data Science
    Gain practical understanding of Python to read, understand, and write professional Python code for your first day on the job. Learn more Join!
    An Intuition-Based Options Primer for FE
    Ideal for entry level positions interviews and graduate studies, specializing in options trading arbitrage and options valuation models. Learn more Join!

C++ binomial tree float versus double preformance

Joined
2/23/09
Messages
11
Points
11
Hey guys, I'm implementing a binomial tree version in C++ to benchmark versus CUDA and I found an interesting issue: changing the CPU code to use doubles(64 bit) for everything instead of float(32 bit) actually increases performance of the CPU code significantly (~3.5x faster.) Anyone know whats going on here, I always assumed floats were faster than doubles???

Also the cpu is a 64 bit processor and the speed improvement occurred when compiled in both MS express edition and g++.
 
your system could be converting floats to doubles to do the underlying operations.
 
Back
Top