ruby-concurrency / concurrent-ruby

Modern concurrency tools including agents, futures, promises, thread pools, supervisors, and more. Inspired by Erlang, Clojure, Scala, Go, Java, JavaScript, and classic concurrency patterns.
https://ruby-concurrency.github.io/concurrent-ruby/
Other
5.71k stars 420 forks source link

Add new ConcurrentMap backend for TruffleRuby #907

Closed wildmaples closed 3 years ago

wildmaples commented 3 years ago

We've created a new backend for more efficient mapping on TruffleRuby using Java's ConcurrentHashMap library - https://github.com/oracle/truffleruby/pull/2339

The new backend is faster than the previous implementation for TruffleRuby, AtomicReferenceMapBackend. And also faster than MRI and JRuby:

675% relative to MRI and 539% relative to JRuby.

Changes

Testing

The new backend has been tested locally and passes the map_spec on this gem

chrisseaton commented 3 years ago

Sorry didn't realise I left my only comment as 'pending'!

chrisseaton commented 3 years ago

I need to do a bit of exploring to remind myself how to do a release, but I'll get onto that.

pitr-ch commented 3 years ago

@chrisseaton do you need a new release? I'll have time next week.

chrisseaton commented 3 years ago

Yes please! I was going to reach out at some point. I was looking at trying myself but it looks fairly complicated to release. Can you please document how you do it as you go through the steps? Thanks very much.

pitr-ch commented 3 years ago

Ok, I'll see what I can do about improving the release doc.

pitr-ch commented 3 years ago

I've flatten the condition https://github.com/ruby-concurrency/concurrent-ruby/commit/382550c1ec453ed310cca61436288eb80eacf0d9 Release will land soon.

pitr-ch commented 3 years ago

The build doc was updated in https://github.com/ruby-concurrency/concurrent-ruby/commit/5f06b9bc337c5de05a0960b3f87a65e03f1cd4cd

pitr-ch commented 3 years ago

released.

eregon commented 3 years ago

Thanks!