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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T20:55:00+00:00 2026-05-25T20:55:00+00:00

I am trying to find a performance issue in my program and thus instrumented

  • 0

I am trying to find a performance issue in my program and thus instrumented the code with profiling. gprof creates a flat profile like this:

Flat profile:

Each sample counts as 0.01 seconds.
  %   cumulative   self              self     total           
 time   seconds   seconds    calls  ms/call  ms/call  name    
 27.97      4.10     4.10                             std::_Deque_iterator<char, char&, char*>::_Deque_iterator(std::_Deque_iterator<char, char&, char*> const&)
  6.96      5.12     1.02                             std::_Deque_iterator<char, char&, char*>::difference_type std::operator-<char, char&, char*>(std::_Deque_iterator<char, char&, char*> const&, std::_Deque_iterator<char, char&, char*> const&)
  5.12      5.87     0.75                             std::__deque_buf_size(unsigned int)
  4.23      6.49     0.62                             std::_Deque_iterator<char, char&, char*>::operator+=(int)
  3.41      6.99     0.50                             std::deque<char, std::allocator<char> >::begin()
  1.91      7.27     0.28     7896     0.04     0.04  std::vector<MyClass, std::allocator<MyClass> >::_M_insert_aux(__gnu_cxx::__normal_iterator<MyClass*, std::vector<MyClass, MyClasst> > >, MyClassconst&)
  1.91      7.55     0.28                             std::deque<char, std::allocator<char> >::size() const
  1.91      7.83     0.28                             std::_Deque_iterator<char, char&, char*>::_S_buffer_size()

followed by many lines with less time.

First question: is it a valid assumption to believe that there seems to be a problem with a std::deque? The problem is: I know we are using std::deque, but I am not aware of a usage with <char>.

If this assumption is true, it seems to make sense to look at the call stack and see where this deque is used. Howevre all entries concerning the deque<char> stuff are only called by <spontaneous>!

Just one example:

index % time    self  children    called     name
                                                 <spontaneous>
[1]     28.0    4.10    0.00                 std::_Deque_iterator<char, char&, char*>::_Deque_iterator(std::_Deque_iterator<char, char&, char*> const&) [1]

Is there any way to find out more about this deque?

Thanks for any hints!

  • 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-25T20:55:00+00:00Added an answer on May 25, 2026 at 8:55 pm

    Apparently, spontaneous is what gprof uses when it can’t work out the calling function. I would try recompiling all code with -pg (is it possible you missed some files?). Also, make sure you have optimisation turned on. Inlining will typically make these little functions disappear into the calling function which is generally more useful.

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

Sidebar

Related Questions

I'm trying to find out the most efficient (best performance) way to check date
I'm currently trying to find the best way (in term of usability and performance)
We're trying to find out some performance fixes reading from a TADOQuery. Currently, we
I'm trying to find duplicate rows based on mixed columns. This is an example
I'm trying to find the best method of incode performance monitoring on the iPhone.
I am trying to find all possible ways I could improve my website performance.
For some performance reasons, I am trying to find a way to select only
I have an issue trying to maximize the performance of our listview that has
I couldn't find a good title for the question, this is what I'm trying
My code is working however i am trying to find a more efficient way

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.