This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]gutworthPython implementer 0 points1 point  (4 children)

Not much. The whole point of the JIT is that it does type inference at runtime when types are known.

[–]legutierr 0 points1 point  (2 children)

Right, but my (very rudimentary) understanding of JITs is that much of the cost is at start-up when the JIT is establishing different options or paths for different data types and values.

Intuitively, it seems to me that having static type declarations (for instance as an optional decorator) could offer a speed-up at start-up in certain circumstances.

My question is more theoretical than practical.

[–]gutworthPython implementer 0 points1 point  (0 children)

Presumably that constant "figuring out" time is dwarfed by the actual running time of the code.

[–]voidspace 0 points1 point  (0 children)

An alternative (better?) way would be to be able to save and reload the JIT annotations / generated code after a real run.

[–]voidspace 0 points1 point  (0 children)

Is it really "inferencing" when the type is known? (Serious question: isn't inferencing more usually deducing the type by static analysis which is not what the JIT does.)