This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [PATCH] libstdc++/8761 and libstdc++/7076
On Sat, Jan 11, 2003 at 12:00:42PM -0500, Jerry Quinn wrote:
> If the format cache is a reasonable way to go in general, we could
> cache the facets directly in a map or hash indexed by typeid name.
The regular use_facet<>() operation is at least as fast as any cache
of facets that you could come up with, and almost certainly much
faster. It's essentially the same as a vector<> lookup using a
static-member index. All the optimization potential is in caching
results from _calling_ members of a facet. (Of course the results
need not be cached as-is, but might be stored in the forms (plural)
most efficient for use by inserters and extractors.)
Nathan Myers
ncm-nospam@cantrip.org