| Age | Commit message (Collapse) | Author |
|
Put getters together and make consistent with Symbol.
|
|
Put getters together.
|
|
Split into logical sections and put more related methods closer to one
another.
|
|
The old note no longer seems to apply. Going through the defconfig part
of the test suite without verification in PyPy drops from ~5:50 to
~5:30, and line_prof shows some improvement for CPython too.
Passing the 'write' method around instead was a bit slower.
|
|
|
|
Cleaner to just check for more tokens in the few spots that used it.
Seems slightly faster too, though it might be in the noise.
|
|
The most common case by far (> 85% for both && and || with the x86
Kconfigs) is a single operand (i.e., no && or ||). Sticking it in a list
and then immediately throwing the list away is wasteful.
Makes _parse_expr() at least 10% faster during testing.
|
|
|
|
Matches their function.
|
|
Instantiating that nested function with free variables turned out to be
quite expensive in cProfile.
For the _build_dep() case, it would be even neater to have a function
like _add_sym_deps(sym, expr) that adds 'sym' to each 'deps' set in
'expr', removing the need for a temporary set. Unfortunately,
_get_expr_syms() is used elsewhere too, and it's probably not worthwhile
having another very similar function just as a small optimization.
|
|
Redundant, plus we get more coverage for the default state.
|
|
Bit friendlier.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Simpler.
|
|
|
|
|
|
Speeds _Feed creation up a bit during tokenization. Keep public classes
slotless for flexibility.
|
|
Optimization. Saves an 'if None' check for each 'help'.
|
|
Small optimization. No need to fetch it for 'help' tokens, which return
early.
|
|
The regexes handle most stripping of trailing space now too.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- Get rid of the weird strip/reindex dance and keep 's' intact
throughout. This also fixes _tokenization_error() output, as it would
previously report the stripped string.
- Strip trailing whitespace in the regexes. This makes the stripping
loop very cheap.
- Shorten a comment that might've been more confusing than helpful.
|
|
We're never updating nodes here, since the original expressions should
be preserved. We're just trying to avoid creating redundant nodes.
|
|
|
|
|
|
Use python3 if testsuite.py was run with python3, etc.
|
|
|
|
Only way it's used.
|
|
The line number was previously for logical lines only. Oversight.
Get rid of _get_lines() and keep the raw lines in _FileFeed instead,
only joining lines with continuation lines as they are fetched. This
makes the index correspond to the correct line number from the file. (It
also means most lines are returned as-is without any logic applied to
them, which is nice.)
Litter tests/Klocation with continuation lines to get test coverage.
Remove some unused functions that were previously inherited from _Feed
and remove it as a base class of _FileFeed.
|
|
|
|
A scientific '$ top -d 0.01' experiment shows it's just waiting around
for the vast majority of those tests.
|
|
|
|
Internal details are already assumed.
|
|
|
|
None should never appear as a subexpression.
|
|
|
|
Single trivial user.
|
|
Bit overengineered. Not performance-sensitive.
|
|
Dubious value and poorly named. Also rearrange cases by frequency.
|
|
|