Ruby bindings to RE2, a "fast, safe, thread-friendly alternative to backtracking regular expression engines like those used in PCRE, Perl, and Python".
Use the TypedData API introduced in Ruby 1.9.2, instead of the old Data API that was deprecated in Ruby 2.3.
This allows to implement Write Barriers.
Write barrier protected objects are allowed to be promoted to the old generation, which means they only get marked on major GC, making minor GC faster.
The downside is that the RB_BJ_WRITE macro MUST be used to set references, otherwise the referenced object may be garbaged collected.
Use the
TypedData
API introduced in Ruby 1.9.2, instead of the oldData
API that was deprecated in Ruby 2.3.This allows to implement Write Barriers.
Write barrier protected objects are allowed to be promoted to the old generation, which means they only get marked on major GC, making minor GC faster.
The downside is that the
RB_BJ_WRITE
macro MUST be used to set references, otherwise the referenced object may be garbaged collected.This also allow to implement GC compaction.