Skip to content

Commit

Permalink
Merge pull request #114 from itamarst/102-speed-up
Browse files Browse the repository at this point in the history
Double the speed of zfec
  • Loading branch information
meejah authored Nov 15, 2024
2 parents ebc017b + 2ccec24 commit dedbae7
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ jobs:
- "ubuntu-22.04"
- "windows-2022"
wheel-selector:
- "cp38-*"
- "cp39-*"
- "cp310-*"
- "cp311-*"
Expand All @@ -57,7 +56,7 @@ jobs:
fetch-depth: 0

- name: Build wheels
uses: pypa/cibuildwheel@v2.20.0
uses: pypa/cibuildwheel@v2.21.3
with:
output-dir: wheelhouse
env:
Expand All @@ -71,6 +70,11 @@ jobs:
CIBW_ARCHS_MACOS: "x86_64 universal2 arm64"
# Skip testing arm64 builds on Intel Macs.
CIBW_TEST_SKIP: "*-macosx_arm64 *-macosx_universal2:arm64"
# Use newer manylinux so we get newer gcc and can take advantage of
# speed boost from x86-64-v2, at the cost of not supporting some old
# patch releases of Python 3.9 if they haven't updated pip in their
# virtualenv.
CIBW_MANYLINUX_X86_64_IMAGE: "manylinux_2_28"
- uses: actions/upload-artifact@v3
name: Upload artifacts
with:
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,11 @@ jobs:
- "ubuntu-22.04"
- "windows-2022"
python-version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "3.13-dev"
- "pypy-3.8"
- "3.13"
- "pypy-3.9"
- "pypy-3.10"

Expand Down
7 changes: 6 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from setuptools import setup
from setuptools.extension import Extension

import platform
import sys
import os
import versioneer

DEBUGMODE = False
Expand All @@ -24,6 +24,11 @@
break

extra_compile_args.append("-std=c99")
if platform.machine() == "x86_64" and platform.system().lower().startswith("linux"):
# Only support CPUs starting from 2008/2009 or so, and run twice as fast as
# a result! This requires sufficiently new gcc, 11 maybe?
extra_compile_args.append("-march=x86-64-v2")

if DEBUGMODE:
extra_compile_args.append("-O0")
extra_compile_args.append("-g")
Expand Down

0 comments on commit dedbae7

Please sign in to comment.