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

Inline structure data type for mruby (MRB_TT_INLINE) #3251

Closed
wants to merge 1 commit into from

Conversation

dabroz
Copy link
Contributor

@dabroz dabroz commented Nov 16, 2016

New data type MRB_TT_INLINE is introduced.

Inline structures have no instance variables, no finalizer, and offer as much space as possible in RBASIC object. This means 24 bytes on 64-bit platforms and 12 bytes on 32-bit platforms. Inline structures are always copied by value.

Only additions to core are 3 simple inline methods in inline.h. No extra classes are introduced. No C and/or Ruby gem code is added.

mruby-inline-struct gem is only provided for testing.

Fixes #3237.

Inline structures have no instance variables, no finalizer, and offer as much space as possible in RBASIC object. This means 24 bytes on 64-bit platforms and 12 bytes on 32-bit platforms.
mruby-inline-struct gem is only provided for testing.
@matz
Copy link
Member

@matz matz commented Nov 17, 2016

Nice idea&implementation. I will merge this after small modifications.

matz added a commit that referenced this issue Nov 17, 2016
bundled testing gems do not need to be included in default.gembox.
all gems under mrbgems are linked automatically in the test process.
@matz
Copy link
Member

@matz matz commented Nov 17, 2016

merged. thank you!

@matz matz closed this Nov 17, 2016
@dabroz
Copy link
Contributor Author

@dabroz dabroz commented Nov 17, 2016

Great! Thanks for including these changes so quickly.

I also measured performance boost in mruby-float4. In 64-bit mode (in 32-bit the space is too small to use), it executes bm_ao_render_float4 benchmark 15% faster using istruct!

@matz
Copy link
Member

@matz matz commented Nov 17, 2016

nice.

@dabroz dabroz deleted the feature-inline-struct branch Nov 25, 2016
@dabroz dabroz mentioned this pull request Jan 19, 2017
@dabroz
Copy link
Contributor Author

@dabroz dabroz commented Jan 19, 2017

cc #3140

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.

None yet

2 participants