-
Notifications
You must be signed in to change notification settings - Fork 53
Closed
Description
Before we attempt this, we need to know where the time is spent.
@ericsnowcurrently Do you have any profiling information from running python -S -c "print('Hi')", or a similar script?
It takes about 10 ms on my machine for 3.9 which seems a long time to print "Hi".
For comparison, 2.7 takes about 7ms.
I suspect there is a lot of incidental stuff going on that we can eliminate.
The tasks that have to be performed to run python -S -c "print('Hi')" are:
- Load executable from disk (it should be in memory cache, but it still needs work by the O/S).
- Build config object from command line and environment variables
- Create a new interpreter
- Create a new thread
- Compile (including parsing)
print(Hi") - Execute
print(Hi") - Dispose of thread
- Dispose of interpreter
None of those tasks should take long, so what is slow?
Techcable
Metadata
Metadata
Assignees
Labels
No labels