You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Setting DefaultFactory to nil will cause a segv #133
It is very good to move C code to Ruby without performance impact.
But I found one issue: Calling new public write_* methods with unexpected type makes the ruby VM crashed:
irb(main):002:0> MessagePack::Packer.new.write_array(1)
(irb):2: [BUG] Segmentation fault at 0x00000000000005
There looks a bit performance difference. IMO it's not serious problem, and the benefit from moving code from C to Ruby is much larger than this performance difference. @frsyuki How do you feel?
Activity
tenderlove commentedon Mar 10, 2017
I've sent two PRs to deal with this problem. I prefer #135, but it's a much larger patch than #134, so I understand if it won't get applied.
tagomoris commentedon Mar 10, 2017
I prefer #134. IMO all ruby code in this repository should be shared with CRuby/JRuby implementations.
tenderlove commentedon Mar 10, 2017
@tagomoris Understood. I have updated #135 so that JRuby and CRuby share the same Ruby code: tenderlove/msgpack-ruby@d6ef970
I was able to delete even more code. 😊
tagomoris commentedon Mar 13, 2017
LGTM > #135.
It seems smart for me to reduce C code & move much code to Ruby without performance regression.
@frsyuki How do you think about it?
frsyuki commentedon Mar 13, 2017
It is very good to move C code to Ruby without performance impact.
But I found one issue: Calling new public write_* methods with unexpected type makes the ruby VM crashed:
tenderlove commentedon Mar 13, 2017
Sorry, I forgot to add the type checks. I've fixed in tenderlove/msgpack-ruby@b8493d7
Benchmark Results. Click to expand
Master Branch (before):New Branch (after):
tagomoris commentedon Mar 16, 2017
There looks a bit performance difference. IMO it's not serious problem, and the benefit from moving code from C to Ruby is much larger than this performance difference.
@frsyuki How do you feel?
iconara commentedon Mar 16, 2017
This does not seem to impact JRuby performance significantly. +1 for moving code to Ruby when not impacting performance.
The PR seems to target JRuby 9k exclusively though, is that by design or by accident?
Merge pull request #135 from tenderlove/remove-global-c