commit -- Working STL vector support


Subject: commit -- Working STL vector support
From: Aaron Lehmann (aaronl@vitelus.com)
Date: Mon Dec 18 2000 - 17:35:32 CST


Scroll down for new profiling.

On Mon, Dec 18, 2000 at 02:19:44PM -0800, Aaron Lehmann wrote:
> I just got it working. I'm about to profile it and I'll post a
> followup. I'll post a patch that people on non-Unix platforms can test
> before we commit it.

STL support now works. It is not enabled by default. To test it,
please change #define ABI_OPT_STL 0 to a 1. With good results from
others, I will make this the default for the platforms that can handle
it.
CVS: ----------------------------------------------------------------------
CVS: Enter Log. Lines beginning with `CVS:' are removed automatically
CVS:
CVS: Committing in .
CVS:
CVS: Modified Files:
CVS: src/af/util/xp/ut_vector.cpp
CVS: ----------------------------------------------------------------------

Here is a new profile with STL vectors:

Flat profile:

Each sample counts as 0.01 seconds.
  % cumulative self self total
 time seconds seconds calls us/call us/call name
  7.69 0.02 0.02 28689 0.70 1.04 UT_HashTable::findEntry(char const *) const
// UT_HashTable is our new biggie. STL time? :)

  7.69 0.04 0.02 20508 0.98 1.51 pt_VarSet::getAP(unsigned int) const
  3.85 0.05 0.01 217947 0.05 0.05 UT_Vector::getNthItem(unsigned int) const

// A nice modest speed increase from 0.09s to 0.05s. However, UT_Vector can't
// be optimized all that much more. getNthItem is basically return m_Entries[n],// and when called 220,000 times it will have significant overhead. The right
// way to optimize it is to call it less. I'll look into this.

  3.85 0.06 0.01 63383 0.16 0.16 EV_EditMethod::getName(void) const
// I just inlined this and commited it.

  3.85 0.07 0.01 29001 0.34 0.34 UT_HashTable::hashFunc(char const *) const

  3.85 0.08 0.01 23482 0.43 0.43 pt_VarSet::getPointer(unsigned int) const
  3.85 0.09 0.01 23108 0.43 0.86 pt_PieceTable::getPointer(unsigned int) const
  3.85 0.10 0.01 23107 0.43 0.43 pf_Frag_Text::getBufIndex(void) const
  3.85 0.11 0.01 20508 0.49 0.49 pt_VarSet::_varsetFromAPIndex(unsigned int) const
  3.85 0.12 0.01 20344 0.49 0.49 PP_Property::canInherit(void) const
  3.85 0.13 0.01 17767 0.56 0.56 fp_TextRun::isSubscript(void) const
// Just inlined all of these so they should be non-issues. They're all basically
// accessors.

  3.85 0.14 0.01 13624 0.73 0.73 UT_stricmp
  3.85 0.15 0.01 7365 1.36 1.36 GR_UnixGraphics::setColor(




This archive was generated by hypermail 2b25 : Mon Dec 18 2000 - 17:35:37 CST