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

  • SEARCH
  • Home
  • 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 8183331
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T01:07:37+00:00 2026-06-07T01:07:37+00:00

I am writing a template algorithm that makes use of boost::accumulators and the Eigen

  • 0

I am writing a template algorithm that makes use of boost::accumulators and the Eigen linear algebra library.
While compiling, the visual studio compiler (cl.exe), memory consumption peaks at over 2.5GB of RAM, and my PC (windows 7 32 bit with 3GB virtual address space) becomes unresponsive (for quite a long time: ~1 minute). The binary files (.obj) are 10-20MB for these compilation units.

My questions (not directed towards these specific libraries)

  1. Is this normal behavior for code that heavily uses templates?
  2. Is there something that can be done to reduce the memory demands and
    compile time?
  3. If there is no good solution to the problem, why isn’t this
    addressed by the people that design the programming language? The
    more people understand C++, the more they are likely to use templates, and generate hard-to compile code, and bloated binaries.
  • 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-07T01:07:40+00:00Added an answer on June 7, 2026 at 1:07 am

    If there is no good solution to the problem, why isn’t this addressed
    by the people that design the programming language?

    Because there is no good solution, full stop.

    The problem you are talking about has nothing to do with C++. It’s an artefact from C- the old “translation unit”. Fixing this problem would require re-doing the compilation model. The C++ Committee has been trying for years to make this happen without breaking every single line of existing C++ out there (which is a bigger consideration), but it’s not a trivial problem. Fixing it would require vast changes.

    Also, Clang has way better performance, and newer versions of GCC which are variadic-template-equipped can do as well.

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

Sidebar

Related Questions

i'm writing an email template and was told to use only inline css (because
I'm writing an XSLT template that need to output a valid xml file for
I am currently writing a C++ template expression library and comparing some instantiations with
I'm writing a template that will be used like this: {{templatename |var1=foo |var4=bar |var14=toot
I am busy writing a CodeSmith template that has one of its properties as
Suppose I am writing a template library consisting of a function template template<T> void
While writing several math utilities I bumped into need to implement generic utility that
So in writing a C++ template class, I have defined a method that returns
I'm writing a program that fills in a pdf template (using fpdf) then captures
I'm writing a parallel evolutionary algorithm library using C++, MPI and CUDA. I need

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.