Skip to content

Conversation

@jjhelmus
Copy link
Contributor

@jjhelmus jjhelmus commented Nov 12, 2025

Use -O0 when building all projects for the debug option and -O3 in other cases. Individual build script can adjust these if needed.

closes #849
partially addresses #846

@jjhelmus
Copy link
Contributor Author

This should address the performance issues seen in #849 and #846. I'll do some test builds locally and check the results on some benchmarks.

@jjhelmus
Copy link
Contributor Author

Running the sqlite tests from #849 shows improved performance with this change:

Before

======================================================================
RESULTS
======================================================================
CREATE TABLE time:      0.170s  ( 11.4%)
INSERT time:            0.703s  ( 47.4%)
CREATE TRIGGER time:    0.610s  ( 41.1%)
----------------------------------------------------------------------
TOTAL TIME:             1.484s
======================================================================

With change

======================================================================
RESULTS
======================================================================
CREATE TABLE time:      0.060s  (  8.8%)
INSERT time:            0.389s  ( 57.1%)
CREATE TRIGGER time:    0.230s  ( 33.9%)
----------------------------------------------------------------------
TOTAL TIME:             0.680s
======================================================================

As does the pybench compression tests mentioned in #846

Before

❯ ./ref/install/bin/python bench.py     
Compress using BZ2 algorithm:
[========================================] 100.0% 0:00:23
Compress using LZMA algorithm:
[========================================] 100.0% 0:01:07
...

With change

❯ ./new/install/bin/python bench.py
Compress using BZ2 algorithm:
[========================================] 100.0% 0:00:07
Compress using LZMA algorithm:
[========================================] 100.0% 0:00:17
...

@jjhelmus jjhelmus merged commit 1859bbe into astral-sh:main Nov 12, 2025
484 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

platform:darwin Specific to the macOS platform platform:linux Specific to the Linux platform

Projects

None yet

Development

Successfully merging this pull request may close these issues.

macOS SQLite performance regression (2.5x slower)

2 participants