mmtk / mmtk-julia

Julia binding for MMTk
13 stars 9 forks source link

Use cheap safepoint in alloc #83

Closed qinsoon closed 1 year ago

qinsoon commented 1 year ago

jl_gc_safepoint() is expensive, as it needs to get the current stack from pthread keys. The cheap alternative is jl_gc_safepoint_(ptls). This can improve mutator time significantly for benchmarks that call allocation frequently from the runtime code (e.g. 20% improvement for objarray).