Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4245414
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T03:50:14+00:00 2026-05-21T03:50:14+00:00

My goal is to find the fastest C++ library for casting int to string,

  • 0

My goal is to find the fastest C++ library for casting int to string, vice versa, and parsing.

Anyone that has experimented with performance of C++ will quickly realize that the string class of STL has terrible performance compared to say STL int arithmetic operations.

Some sample benchmarks from my 3.3 GHz Intel, GCC, CentOS 5.5 machine:

memcpy        0.004000 microsec/op
atoi          0.025000 microsec/op
atof          0.133000 microsec/op
strtod        0.133000 microsec/op
atof          0.135108 microsec/op
(char) uchar  0.001801 microsec/op
(char) ushort 0.001801 microsec/op
cache accs    0.010505 microsec/op
maplookup     0.128534 microsec/op
add_int       0.002456 microsec/op

You can quickly see that string operations will become a bottleneck for any high speed messaging applications.

I have located other libs for high performance strings (listed), but I am writing hoping someone has had similar difficulty and has reached some solution, possibly including writing their own string class.

  • http://bstring.sourceforge.net/
  • http://code.google.com/p/stringencoders/
  • http://www.and.org/vstr/comparison
  • http://www.boost.org/doc/libs/1_46_1/doc/html/string_algo.html
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T03:50:14+00:00Added an answer on May 21, 2026 at 3:50 am

    You didn’t provide much information about your servers, but have a look at these libraries from AMD and Intel:

    AMD String Library

    Intel Integrated Performance Primitives

    Both use SSE extensions to speed up string operations.

    As far as I can see, they have no atoi(), but you could use the libraries to locate the decimals in the input. Given the string location and length it should be trivial to write a conversion using SSE intrinsics.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My goal is to find the package (as string) of a Java source file,
my goal is to write a stored proc that can collect all field values
The goal: Any language. The smallest function which will return whether a string is
My goal: Find a DIV, slideUp all of it's child divs, then after all
My goal is to find out how to programmatically adjust permissions on files &
My goal is to find all <?= occurrences with ack. How can I do
I have Persons table in SQL Server 2008 . My goal is to find
I want to find out the type of the data that i am sending
Goal Find a perfect , flexible schema for storing many different types of objects
Goal: to find count of all words in a file. file contains 1000+ words

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.