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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T00:39:24+00:00 2026-05-27T00:39:24+00:00

I am working on improving the performance of a program which uses both the

  • 0

I am working on improving the performance of a program which uses both the Boost Graph Library and boost::bimap. Profiling revealed that most of the time was being spent in memory allocation and deallocation. Making the adjacency_list class of the graph library use boost::fast_pool_allocator improved performance significantly. A large chunk of the remaining memory allocations occur in boost::bimap, so I wanted to experiment with using a custom allocator there as well. The documentation says you can specify the allocator as the last template parameter of the bimap, but it does not say what type the template argument to the allocator itself should be. For example, for types X and Y, in

boost::bimap<set_of<X>, set_of<Y>, boost::fast_pool_allocator<Z> >

what should be filled in for Z?

  • 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-27T00:39:25+00:00Added an answer on May 27, 2026 at 12:39 am

    I believe the answer is that for Z, you should fill in std::pair<X,Y>. This worked in my case, but I wanted to post here because

    • it’s not obvious from the documentation
    • Boost code is not quick to read
    • Googling was unhelpful
    • and other people might have useful comments (for instance, I haven’t tested if this depends on what the left or right view of the bimap is)
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

It's been a couple of days that I'm working on improving NHibernate Insert performance.
We are working on improving our DAL which is written in LINQ that talks
I am working on improving a stream reader class that uses a BinaryReader .
I'm currently working on some R&D for improving the process and practice that we
I'm working on improving the page performance of my company's intranet page. We're looking
Working on improving performance of our decision center, one of the bottlenecks we identify
I am working on improving our glossary functionality in a custom CMS that is
I'm working on improving the performance of a MySQL server. I'm looking for something
I am working on improving website performance. Here are the list of key performance
I've been working on improving the performance of a stored procedure and there is

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.