tagua-vm / parser

Safe, fast and memory efficient PHP parser (lexical and syntactic analysers, and the Abstract Syntax Tree)
http://tagua.io/
119 stars 15 forks source link

AST: Use `SmallVec` for `Name` #109

Closed Hywan closed 7 years ago

Hywan commented 7 years ago

The Name enum uses small vectors instead of vectors to represent part of the names (if Qualified, RelativeQualified, and FullyQualified). Small vectors are located on the stack if the number of items is lower than $N$, after that they are located on the heap.

The number $N = 5$ is strictly arbitrary so far.

The most important commit is https://github.com/tagua-vm/parser/commit/05355297a971489a960a0bb1e0dfd1dee60310c7.

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 93.433% when pulling 36c5b2117912fa0d72718c09bc63a50d30c5732a on Hywan:smallvec into 7b21875dc5da4b2a05d988eb45f56933b92ed423 on tagua-vm:master.

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 93.433% when pulling 36c5b2117912fa0d72718c09bc63a50d30c5732a on Hywan:smallvec into 7b21875dc5da4b2a05d988eb45f56933b92ed423 on tagua-vm:master.

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 93.433% when pulling 36c5b2117912fa0d72718c09bc63a50d30c5732a on Hywan:smallvec into 7b21875dc5da4b2a05d988eb45f56933b92ed423 on tagua-vm:master.

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 93.433% when pulling 36c5b2117912fa0d72718c09bc63a50d30c5732a on Hywan:smallvec into 7b21875dc5da4b2a05d988eb45f56933b92ed423 on tagua-vm:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.04%) to 93.471% when pulling 9909e845698e4fbfe7d5f89e934add1f63722e58 on Hywan:smallvec into 7b21875dc5da4b2a05d988eb45f56933b92ed423 on tagua-vm:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.04%) to 93.471% when pulling 9909e845698e4fbfe7d5f89e934add1f63722e58 on Hywan:smallvec into 7b21875dc5da4b2a05d988eb45f56933b92ed423 on tagua-vm:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.04%) to 93.471% when pulling 9909e845698e4fbfe7d5f89e934add1f63722e58 on Hywan:smallvec into 7b21875dc5da4b2a05d988eb45f56933b92ed423 on tagua-vm:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.04%) to 93.471% when pulling 9909e845698e4fbfe7d5f89e934add1f63722e58 on Hywan:smallvec into 7b21875dc5da4b2a05d988eb45f56933b92ed423 on tagua-vm:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.04%) to 93.471% when pulling 9909e845698e4fbfe7d5f89e934add1f63722e58 on Hywan:smallvec into 7b21875dc5da4b2a05d988eb45f56933b92ed423 on tagua-vm:master.