orc-lang / orc

Orc programming language implementation
https://orc.csres.utexas.edu/
BSD 3-Clause "New" or "Revised" License
42 stars 3 forks source link

Update library sites to use modern Java concurrency tools #192

Open arthurp opened 7 years ago

arthurp commented 7 years ago

Many of the Orc library sites are implemented using Java monitors. Since those sites were implemented Java has added a number of concurrency tools to it's own library (such as ConcurrentLinkedQueue). We could get a significant performance gain by reimplementing Orc library sites based on new Java library classes and using lower level tools that already existed (such as AtomicInteger).

This issue tracks a number of small changes. They are grouped since they will not take much time and they are all closely related. I figured this would be less noisy.

Sites that should to be considered for reimplemention:

(This is basically the entire orc.lib.state package. But there may be other sites that could use a check. Anywhere that uses synchronized would be a good place to start.)

PS: This work may also get us close enough to removing all the old style Java sites that we could just kill them all and get ride of the shims.

arthurp commented 7 years ago

Before starting on this we should verify that the performance of the sites is actually important and is overwhelming the overhead.