https://github.com/root-project/root
Revision ebc047bc39d9500d879a018a392cd551e9d28f69 authored by Rene Brun on 24 March 2005, 07:13:35 UTC, committed by Rene Brun on 24 March 2005, 07:13:35 UTC
a THashTable with a rehash level is incredibly inefficient when calling AddAll(TCollection* col) on it. It rehashes ever single time an added object brings it above the rehash level (which in turn adds all elements added to far to a new THashTable) - this can happen very often, esp if col->GetEntries()>>GetEntries(). The attached patch adds THashTable's own implementation of TCollection::AddAll. Before calling TCollection::AddAll, it estimates whether rehashing will be needed for the combined THashTable. Rehashing before TCollection::AddAll means less elements will have to be copied to the rehashed THashTable. The estimate is based on fSize, assuming an ideal hash. If the collection wasn't rehashed before the call to TCollection::AddAll, THashTable::AddAll will check for rehashing after the collections have been merged. The results should be exactly the same as with the old algorithm, only the performance is many orders of magnitudes better, noticeable esp when adding a larger collection. git-svn-id: http://root.cern.ch/svn/root/trunk@11419 27541ba8-7e3a-0410-8455-c3a389f83636
1 parent 7d9b34a
Tip revision: ebc047bc39d9500d879a018a392cd551e9d28f69 authored by Rene Brun on 24 March 2005, 07:13:35 UTC
From Axel:
From Axel:
Tip revision: ebc047b
File | Mode | Size |
---|---|---|
README | ||
alien | ||
asimage | ||
base | ||
build | ||
chirp | ||
cint | ||
clarens | ||
clib | ||
config | ||
cont | ||
dcache | ||
eg | ||
etc | ||
fonts | ||
freetype | ||
fumili | ||
g3d | ||
ged | ||
gedold | ||
geom | ||
geompainter | ||
gl | ||
globusauth | ||
gpad | ||
graf | ||
gui | ||
guibuilder | ||
hbook | ||
hist | ||
histpainter | ||
html | ||
icons | ||
io | ||
krb5auth | ||
ldap | ||
macros | ||
main | ||
man | ||
math | ||
matrix | ||
meta | ||
metautils | ||
minuit | ||
mlp | ||
mysql | ||
net | ||
netx | ||
newdelete | ||
oracle | ||
peac | ||
pgsql | ||
physics | ||
postscript | ||
proof | ||
proofd | ||
proofplayer | ||
pyroot | ||
pythia | ||
pythia6 | ||
qt | ||
qtroot | ||
quadp | ||
rfio | ||
rint | ||
roofit | ||
roofitcore | ||
rootd | ||
roots | ||
rootx | ||
rpdutils | ||
ruby | ||
sapdb | ||
sessionviewer | ||
srputils | ||
table | ||
test | ||
thread | ||
tree | ||
treeplayer | ||
treeviewer | ||
tutorials | ||
unix | ||
utils | ||
venus | ||
vmc | ||
vms | ||
win32 | ||
win32gdk | ||
winnt | ||
x11 | ||
x11ttf | ||
x3d | ||
xml | ||
xmlparser | ||
xrootd | ||
zip | ||
.cvsignore | -rw-r--r-- | 52 bytes |
LICENSE | -rw-r--r-- | 1.6 KB |
Makefile | -rw-r--r-- | 29.3 KB |
configure | -rwxr-xr-x | 106.9 KB |
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...