Comments (3)
Hi @xuanvuzzz2601 - I don't think pyenv for Windows supports nogil (only pyenv for Linux and macOS). You can use the Windows installer from here: https://github.com/colesbury/nogil/releases (python-3.9.10-amd64.exe), but be warned that there are fewer support C-API extensions for nogil on Windows than for Linux or macOS.
from nogil.
I have tested running the results of 2 programs with GIL and NOGIL but it doesn't seem to work on window. Please let me know what setup is needed for it to work.
from nogil.
Hi @xuanvuzzz2601, what is your definition of working/not working? How do you invoke your script? I have run your example (with slight enhancements):
from threading import Thread
import time
import sys
print(sys.flags)
COUNT = 50000000
def countdown(n):
while n>0:
n -= 1
# 1st pass
start = time.time()
countdown(COUNT)
end = time.time()
print('Time taken in seconds -', end - start)
# 2nd pass
t1 = Thread(target=countdown, args=(COUNT//2,))
t2 = Thread(target=countdown, args=(COUNT//2,))
start = time.time()
t1.start()
t2.start()
t1.join()
t2.join()
end = time.time()
print('Time taken in seconds -', end - start)
And I got the following result running py -3.9 .\test.py
(I do not have regular CPython 3.9 installed on my Windows machine)
sys.flags(debug=0, inspect=0, interactive=0, optimize=0, dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=0, verbose=0, bytes_warning=0, quiet=0, hash_randomization=1, isolated=0, dev_mode=False, nogil=True)
Time taken in seconds - 2.3499691486358643
Time taken in seconds - 1.1804711818695068
Please note that the nogil
flag is set to True
, indicating that nogil
is being used. Please check and compare it on your system.
from nogil.
Related Issues (20)
- Missing Instruction.arg from dis.py and some operations from opcode.py HOT 1
- wheel for zstandard (fix for nogil) HOT 1
- Problems using Pandas and Numpy HOT 13
- Building wheels HOT 13
- Unable to install packages on windows using pip HOT 2
- Uploading this python version to aws layer HOT 5
- [Request] portable builds for Windows HOT 8
- [Performance Degradation] Unable to reproduce the example HOT 3
- an error occured when building the msi files HOT 2
- Correct C API Usage Logic for NO_GIL Multi-threading HOT 6
- Using PyInstaller with nogil python HOT 4
- Can't install nogil on MacOS. (arm64) HOT 3
- Docker image for arm64 HOT 3
- KeyError: b'error' in code.intern_identifier(self.attribute) with in Cython-3.0.8-nogil39-nogil HOT 3
- [rfe] - orphan branch with quilt patch queue HOT 1
- Crash then import orjson
- Please publish psycopg2-binary sources with changes
- Running interpreter in Windows HOT 1
- gc.collect() not able to collect HOT 2
- Possible memory leak
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nogil.