HashTbl: change allocation of end iterators
- the end iterators and canonicalSize are independent of the templated parameters, so move them to HashTblCore - this avoid allocating separate end iterator at all. end(), cend() return a iteratorEnd. iterator == iteratorEnd just checks for non-NULL pointer on iterator. The compiler should optimize most of it away.
Showing
- src/OpenFOAM/Make/files 1 addition, 1 deletionsrc/OpenFOAM/Make/files
- src/OpenFOAM/containers/HashTables/HashTbl/HashTbl.C 9 additions, 10 deletionssrc/OpenFOAM/containers/HashTables/HashTbl/HashTbl.C
- src/OpenFOAM/containers/HashTables/HashTbl/HashTbl.H 47 additions, 21 deletionssrc/OpenFOAM/containers/HashTables/HashTbl/HashTbl.H
- src/OpenFOAM/containers/HashTables/HashTbl/HashTblCore.C 1 addition, 1 deletionsrc/OpenFOAM/containers/HashTables/HashTbl/HashTblCore.C
- src/OpenFOAM/containers/HashTables/HashTbl/HashTblI.H 53 additions, 32 deletionssrc/OpenFOAM/containers/HashTables/HashTbl/HashTblI.H
- src/OpenFOAM/containers/HashTables/HashTbl/HashTblIO.C 2 additions, 2 deletionssrc/OpenFOAM/containers/HashTables/HashTbl/HashTblIO.C
Please register or sign in to comment