PDA

View Full Version : Less system cost



Momergil
11th October 2012, 14:25
Hello!

A quick question this time:

what is less system costfull: use and do some quick calculations using double, or convert a number from QString to float and than to that same calculations using float?


Context:

Using QDoubleSpinBox for number inputs, where I can choose to use the Changed slot picking a double value or the value as a QString.

Thanks,

Momergil

wysota
11th October 2012, 15:25
Hello!

A quick question this time:

what is less system costfull: use and do some quick calculations using double, or convert a number from QString to float and than to that same calculations using float?

Using double all the way is less expensive than keeping a string and converting it to a float.