Profile and optimize
- Eliminate unnecessary copies of grammar objects - Do cheaper comparisons first in equality methods
This commit is contained in:
parent
68d44fd565
commit
3b388d66cd
7 changed files with 20 additions and 22 deletions
|
|
@ -23,7 +23,7 @@ namespace tree_sitter {
|
|||
}
|
||||
|
||||
size_t ISymbol::hash_code() const {
|
||||
return hash<size_t>()(index) ^ hash<int16_t>()(options);
|
||||
return hash<int>()(index) ^ hash<int16_t>()(options);
|
||||
}
|
||||
|
||||
rule_ptr ISymbol::copy() const {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue