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 8812557
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T03:37:56+00:00 2026-06-14T03:37:56+00:00

Is there an equivalent to the blitz++ library for strings (i.e. a library which

  • 0

Is there an equivalent to the blitz++ library for strings (i.e. a library which improves performance of string construction/manipulation by delaying string building until the whole expression is read)?

Blitz++ improves the speed of matrix/vector operations by template metaprogramming, constructing a “syntax tree” at compile time from expressions like A + B + C and then evaluating the syntax tree. This method could, for example, improve the performance of string concatenation, since after having seen an expression like s1 + s2 + s3, the size of the result will be known, such that then memory allocation and copying can be done in one step, rather than first allocating memory for s1 + s2, copying, allocating memory for (s1 + s2) + s3, and then copying again.

  • 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-06-14T03:37:57+00:00Added an answer on June 14, 2026 at 3:37 am

    I know QString uses expression templates to determine the final string’s size and efficiently allocates this beforehand. I think the underlying code isn’t that hard, and could be made to work with most existing string classes. From the Qt 4.8 manual:

    QStringBuilder uses expression templates and reimplements the '%' operator so that when you use '%' for string concatenation instead of '+', multiple substring concatenations will be postponed until the final result is about to be assigned to a QString. At this point, the amount of memory required for the final result is known. The memory allocator is then called once to get the required space, and the substrings are copied into it one by one.

    Take a look at the wiki on the subject for an example on the technique.

    Note that this does interfere with stuff like decltype(a+b) or auto c = a+b where the expression template operator+ is used, as the type returned is a proxy type, and not the original type of a or b.

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

Sidebar

Related Questions

Is there any equivalent string function or library in java that behaves the way
Is there an equivalent of Python's urllib library in Haskell? I want to login
Is there an equivalent of the UNIX 'which' command, i.e. for given resource(s), traverse
Is there an equivalent library for JAXB in .NET? I am trying to convert
Is there an equivalent of PRINT 'hello world' which can be called from CLR
Is there an equivalent for curl --resolve .... in PHP CURL library ? Background:
Is there any equivalent of open-source ANSI-C library for cryptographic primitives. I know about
Are there equivalent to perl -c syntax check for JavaScript from command? Given that
Is there equivalent to \Q ... \E in C# Regex? I can't find it.
Is there an equivalent Matlab dot function in numpy? The dot function in Matlab:

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.