Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Immediate arrays that are not scanned by the GC #38

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gasche
Copy link
Member

@gasche gasche commented May 17, 2024

Proposal: an Array.MakeImmediate : sig type t [@@immediate] end -> sig ... end functor that produces a monomorphic type of array-like structures that are not scanned by the GC. The suggested implementation uses a custom block to support comparison, etc.

Full details: Rendered RFC

by a dedicated library)

- bigarray access is slightly slower due to performing an extra read
to get the layout
Copy link
Member Author

Choose a reason for hiding this comment

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

@lthls, @chambart pointed out that this is not true if the layout type of the bigarray is statically known. You get an extra indirection, but this should be okay. On the other hand, you might still run in GC-pacing issues if you have lots of small bigarrays.

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.

1 participant