What would need to be done to get sdc.lexer to std.lexer quality?

Jacob Carlborg doob at me.com
Thu Aug 2 00:21:48 PDT 2012


On 2012-08-02 09:11, Jacob Carlborg wrote:

> If you change Token to a struct it takes 64 bytes on a LP64 platform. I
> don't know if that is too big to be passed around by value.

Just for comparison, the type used for tokens in Clang is only 24 bytes. 
The main reason is the small source location. It's only 32 bites wide, 
it uses an uint as some kind of offset or id.

http://clang.llvm.org/doxygen/classclang_1_1Token.html
http://clang.llvm.org/doxygen/classclang_1_1SourceLocation.html

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list