Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 What is the most efficient way to do type conversions?
Index -> Programming, C++ -> C++ Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
copthesaint




PostPosted: 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.
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: 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?
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
copthesaint




PostPosted: 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?
Tony




PostPosted: 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.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Display posts from previous:   
   Index -> Programming, C++ -> C++ Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 4 Posts ]
Jump to:   


Style:  
Search: