Skip to content

Commit dedbae7

Browse files
authored
Merge pull request #114 from itamarst/102-speed-up
Double the speed of zfec
2 parents ebc017b + 2ccec24 commit dedbae7

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed

.github/workflows/build.yml

+6-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ jobs:
3838
- "ubuntu-22.04"
3939
- "windows-2022"
4040
wheel-selector:
41-
- "cp38-*"
4241
- "cp39-*"
4342
- "cp310-*"
4443
- "cp311-*"
@@ -57,7 +56,7 @@ jobs:
5756
fetch-depth: 0
5857

5958
- name: Build wheels
60-
uses: pypa/cibuildwheel@v2.20.0
59+
uses: pypa/cibuildwheel@v2.21.3
6160
with:
6261
output-dir: wheelhouse
6362
env:
@@ -71,6 +70,11 @@ jobs:
7170
CIBW_ARCHS_MACOS: "x86_64 universal2 arm64"
7271
# Skip testing arm64 builds on Intel Macs.
7372
CIBW_TEST_SKIP: "*-macosx_arm64 *-macosx_universal2:arm64"
73+
# Use newer manylinux so we get newer gcc and can take advantage of
74+
# speed boost from x86-64-v2, at the cost of not supporting some old
75+
# patch releases of Python 3.9 if they haven't updated pip in their
76+
# virtualenv.
77+
CIBW_MANYLINUX_X86_64_IMAGE: "manylinux_2_28"
7478
- uses: actions/upload-artifact@v3
7579
name: Upload artifacts
7680
with:

.github/workflows/test.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,11 @@ jobs:
2121
- "ubuntu-22.04"
2222
- "windows-2022"
2323
python-version:
24-
- "3.8"
2524
- "3.9"
2625
- "3.10"
2726
- "3.11"
2827
- "3.12"
29-
- "3.13-dev"
30-
- "pypy-3.8"
28+
- "3.13"
3129
- "pypy-3.9"
3230
- "pypy-3.10"
3331

setup.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
from setuptools import setup
22
from setuptools.extension import Extension
33

4+
import platform
45
import sys
5-
import os
66
import versioneer
77

88
DEBUGMODE = False
@@ -24,6 +24,11 @@
2424
break
2525

2626
extra_compile_args.append("-std=c99")
27+
if platform.machine() == "x86_64" and platform.system().lower().startswith("linux"):
28+
# Only support CPUs starting from 2008/2009 or so, and run twice as fast as
29+
# a result! This requires sufficiently new gcc, 11 maybe?
30+
extra_compile_args.append("-march=x86-64-v2")
31+
2732
if DEBUGMODE:
2833
extra_compile_args.append("-O0")
2934
extra_compile_args.append("-g")

0 commit comments

Comments
 (0)