Skip to content

Commit 8725c66

Browse files
stgatilovaothms
authored andcommitted
Performance improvement of IfcParse tokenizer (IfcOpenShell#82)
* Applied MSVC tabify to IfcParse.cpp/h. * Now Argument base class has throwing implementation for each conversion operator (removed those from derived classes). * Added NullArgument class for the case when null arguments appear after setting elements. * Now operator tokens are handled just like any other token. * Refactoring: Token is now a struct with good fields, not a nameless pair. * Now end position of token is set at its construction. * Now type of token is determined on construction, as* function simply check stored type. * Now int-s, float-s and some etc are parsed when token is created. * Implemented simple way to remove spaces in parsing. * Tokens are now created without allocations. * Call RemoveTokenSeparators once for every token. * Added temporary std::string object in lexer (for optimization purposes). * Reimplemented asString without allocations. * Parsing keywords without allocations. * Added checks for type to tokenFunc::as*** functions.
1 parent cbbdb61 commit 8725c66

4 files changed

Lines changed: 248 additions & 183 deletions

File tree

0 commit comments

Comments
 (0)