Skip to content

Use mach_vm_remap in Tachyon on macOS - #3

Closed
maurycy wants to merge 44 commits into
mainfrom
vmremap
Closed

maurycy wants to merge 44 commits into
mainfrom
vmremap

Conversation

@maurycy

@maurycy maurycy commented Jun 3, 2026 •

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-04T00: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-04T00: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
@pablogsal

Copy link
Copy Markdown

Dude these numbers are amazing!

@maurycy

maurycy commented Oct 31, 2026

Copy link
Copy Markdown
Owner Author

python#161011

@maurycy maurycy closed this Oct 31, 2026
@maurycy
maurycy deleted the vmremap branch October 31, 2026 15:45
@maurycy
maurycy restored the vmremap branch October 31, 2026 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants