mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 10:06:47 +00:00
Optimize IfcFile::entitiesByReference() by reserving capacity for IfcEntityList in advance.
Around 18.4 % speed-up (avg. of first 2000 calls) when converting a somewhat large (176 MB) file to XML.
This commit is contained in:
committed by
Thomas Krijnen
parent
40c2602b0e
commit
38f7ccdc20
@@ -48,6 +48,7 @@ void IfcEntityList::push(const IfcEntityList::ptr& l) {
|
||||
}
|
||||
}
|
||||
unsigned int IfcEntityList::size() const { return (unsigned int) ls.size(); }
|
||||
void IfcEntityList::reserve(unsigned capacity) { ls.reserve((size_t)capacity); }
|
||||
IfcEntityList::it IfcEntityList::begin() { return ls.begin(); }
|
||||
IfcEntityList::it IfcEntityList::end() { return ls.end(); }
|
||||
IfcUtil::IfcBaseClass* IfcEntityList::operator[] (int i) {
|
||||
|
||||
Reference in New Issue
Block a user