Skip to content

Conversation

cfbolz
Copy link
Member

@cfbolz cfbolz commented Jun 14, 2025

No description provided.

Copy link
Member

@mattip mattip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

print(mem / (t2 - t1), 'GB/s')
```

Then we need to add some RPython schaffolding:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Then we need to add some RPython schaffolding:
Then we need to add some RPython scaffolding:

9.684149 s
14.901161 GB
1.538717 GB/s
```
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe a word or two here about how the mark-and-sweep GC is much faster than the Boehm one?

0.005999000 seconds sys
```

This is pretty cool, we can run this loop with an IPC of >5. Every allocation
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IPC?


## How often does the GC run?

The RPython GC queries the L2 cache size to determine the size of the nursery. We can find out what it is like this:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The RPython GC queries the L2 cache size to determine the size of the nursery. We can find out what it is like this:
The RPython GC queries the L2 cache size to determine the size of the nursery. We can find out what it is by printing some PYPYLOG gc information to stdout:
Suggested change
The RPython GC queries the L2 cache size to determine the size of the nursery. We can find out what it is like this:
The RPython GC queries the L2 cache size to determine the size of the nursery. We can find out what it is by turning on PYPYLOG, selecting the proper parameters, and printing to `stdout` via `:-` :


```
Loop 1 (run;/home/cfbolz/projects/gitpypy/allocatealot.py:6-9~#24 FOR_ITER) has address 0x7ced473ffa0b to 0x7ced473ffbb0 (bootstrap 0x7ced473ff980)
```
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does the code block show up in the rendered post? I think it might be nicer to break it into two lines with a '\' continuation marker

@cfbolz
Copy link
Member Author

cfbolz commented Jun 15, 2025

thanks @mattip!

@cfbolz cfbolz merged commit 9973ddf into main Jun 15, 2025
6 checks passed
@cfbolz cfbolz deleted the rpython-gc-allocation-speed branch June 15, 2025 18:57
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