Conversation
…mpolyhedra More cleaning
…mpolyhedra Works better.
UniformPolyhedra
Other small changes to wording.
Mark modules that don't get documented.
Add timing decorator that can be used in profiling
* Put builtins in alphabetic order * Add summary text for some built ins * No hard line breaks on doc text * Move non-showing test code in Rationalize out to a pytest
Mostly cosmetic revision of numeric.py
Symmetric Rationalize
Rationalize result that are an integer stay int
All of this will be important in fixing ReadList
* * unroll any/all calls as loops in Cythonized modules: this avoids the overhead of a function call replacing it by a (C) for loop * `BaseExpression.get_head` now avoids to build a symbol and then look for its name. It saves two function calls. * Now, `SameQ` first checks type, then `id`s and then names in symbols. * In `mathics.builtin.patterns.PatternTest`, if the condition is one of the most used tests (`NumberQ`, `NumericQ`, `StringQ`, etc) the `match` method is overwritten to specialized versions that avoid function calls. * in the same aim, `mathics.core.patterns.AtomPattern` now specializes in the comparison depending on the `Atom` type.
Allow white 3d points
Also, we should be thinking about how do things like this in a more general way.
* Full form of lists should be formated with {...}
* fix tests
* fix Series test * CHANGES
load mathics.builtin.box
faster access to Context and ContextPath
TiagoCavalcante
force-pushed
the
master
branch
from
December 14, 2021 22:58
edcaf4c to
6340c1b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In this PR, I have introduced some changes in the
DefinitionsandDefinitionobject to speed up the call to theDefinitions.get_definition()and avoid it always that is possible. Most of the time, the definition that we are looking for during the evaluation is in theDefinitions.definition_cachedictionary, so we can avoid calling the method (150ns).This is done in master tens of millions of times, so these 150ns becomes into seconds.
After running the docpipeline in
main, all the12,137,995of calls to get_definition results in:cache found: 11953654 (98%)
found: 93313 (0.76%)
key invalid: 43498 (.35%)
not found: 32067 (.26%)
clash: 15463 (0.12%)
where
cache foundare definitions already in the cache,foundare definitions with just one definition (either a builtin definition, or a user definition)key invalidare calls with invalid "name"s (like context names, or empty names)not foundare calls with valid names that were not defined before andclashdefinitions that require merging a built-in definition with a user definition.After doing the same in this branch, we have
324155calls (a 2% regarding the total calls in master) distributed asnot found: 122875 (38%)
cache found: 93142 (28%)
found: 84259 (26%)
key invalid: 13400 (4%)
clash: 10479 (3.2%)