Skip to content

Navigation Menu

Sign in
Sign up

Use mach_vm_remap in Tachyon on macOS - #3

Open
maurycy wants to merge 38 commits into
main from
vmremap
Open

Use mach_vm_remap in Tachyon on macOS #3
maurycy wants to merge 38 commits into
main from
vmremap

Conversation

@maurycy

@maurycy maurycy commented Jun 3, 2026
edited
Loading

Copy link
Copy Markdown
Owner

@pablogsal AMA. This is a sneak peak, only get_stack_trace for now. I'm playing with async. I'm cooking it for the past two weeks. It's not bad so far:

Metric Baseline (main 025cc26) This PR Change
Work rate 339,576.5 calls/sec 3,774,163.0 calls/sec 11.11x faster
Sample rate 325,989.3 samples/sec 2,842,399.3 samples/sec 8.72x faster
Avg call time 2.94 μs 0.26 μs -91.2%
Total attempts 979,732 8,532,147 8.71x more
Successful samples 977,970 8,527,201 -
Failed samples 1,762 4,946 -
Success rate 99.82% 99.94% +0.12 pp
Work efficiency 96.2% 75.4% -

I compared binary outputs. I will open a PR in python/cpython once I'm happy but more than open for any comments.

2026年06月04日T00:00:55.450053000+0200 maurycy@gimel /Users/maurycy/src/github.com/maurycy/cpython (vmremap 7299a47) % sudo ./python.exe Tools/inspection/benchmark_external_inspection.py --duration 3
============================================================
get_stack_trace() Benchmark Results
============================================================
Basic Statistics:
 Wall time: 3.000 seconds
 Total attempts: 8,532,147
 Successful samples: 8,527,201
 Failed samples: 4,946
 Success rate: 99.94%
Performance Metrics:
 Average call time: 0.26 μs
 Work rate: 3774163.0 calls/sec
 Sample rate: 2842399.3 samples/sec
 Total work time: 2.261 seconds
 Work efficiency: 75.4%

v.

2026年06月04日T00:03:25.240297000+0200 maurycy@gimel /Users/maurycy/work/cpython-main (main 025cc26) % sudo ./python.exe Tools/inspection/benchmark_external_inspection.py --duration 3
============================================================
get_stack_trace() Benchmark Results
============================================================
Basic Statistics:
 Wall time: 3.000 seconds
 Total attempts: 979,732
 Successful samples: 977,970
 Failed samples: 1,762
 Success rate: 99.82%
Performance Metrics:
 Average call time: 2.94 μs
 Work rate: 339576.5 calls/sec
 Sample rate: 325989.3 samples/sec
 Total work time: 2.885 seconds
 Work efficiency: 96.2%

ref https://github.com/apple-oss-distributions/xnu

@maurycy maurycy self-assigned this Jun 3, 2026
@maurycy maurycy changed the title (削除) Use mach_vm_remap in Tachyon (削除ここまで) (追記) Use mach_vm_remap in Tachyon on macOS (追記ここまで) Jun 4, 2026

Copy link
Copy Markdown

Dude these numbers are amazing!

maurycy reacted with heart emoji

maurycy added 24 commits June 14, 2026 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /