Computer Science Canada What is the most efficient way to do type conversions? |
Author: | copthesaint [ Fri Jan 18, 2013 2:57 pm ] |
Post subject: | What is the most efficient way to do type conversions? |
I was wondering what is the most efficient (fastest) way of doing type conversions, Over the last year I have seen two main things people generally choose to use from reading online posts, they use a library called [ url=http://www.boost.org/]Boost[/url] or use StringStream. My question is what is the most efficient (again meaning how fast the conversion can be done) way to convert types. |
Author: | Tony [ Fri Jan 18, 2013 3:24 pm ] |
Post subject: | RE:What is the most efficient way to do type conversions? |
well you could take the two methods and benchmark them against each other... is your performance bottleneck really in type conversions? |
Author: | copthesaint [ Sat Jan 19, 2013 9:30 pm ] |
Post subject: | RE:What is the most efficient way to do type conversions? |
Well its not so much that I'm worried about performance being significantly effected by any type conversions with what I am doing, its that I like both methods for type conversions, however I was hoping there was a general consensus of which one was more reliable && faster. I guess my choice is only dependent on my preference then? |
Author: | Tony [ Sat Jan 19, 2013 10:30 pm ] |
Post subject: | RE:What is the most efficient way to do type conversions? |
Go with your preference. Going out of your way for insignificant performance gains is also known as "premature optimization" and is generally a bad thing. |