A model and stack implementation of multiple environments
Communications of the ACM
Design of a separable transition-diagram compiler
Communications of the ACM
Java Virtual Machine Specification
Java Virtual Machine Specification
An Efficient Implementation for Coroutines
IWMM '92 Proceedings of the International Workshop on Memory Management
WSC '04 Proceedings of the 36th conference on Winter simulation
Agile Web Development with Rails
Agile Web Development with Rails
The java hotspotTM server compiler
JVM'01 Proceedings of the 2001 Symposium on JavaTM Virtual Machine Research and Technology Symposium - Volume 1
Design of the Java HotSpot™ client compiler for Java 6
ACM Transactions on Architecture and Code Optimization (TACO)
The ruby programming language
ACM Transactions on Programming Languages and Systems (TOPLAS)
Lazy continuations for Java virtual machines
PPPJ '09 Proceedings of the 7th International Conference on Principles and Practice of Programming in Java
Proceedings of the 2013 ACM international symposium on New ideas, new paradigms, and reflections on programming & software
Hi-index | 0.00 |
Coroutines are non-preemptive lightweight processes. Their advantage over threads is that they do not have to be synchronized because they pass control to each other explicitly and deterministically. Coroutines are therefore an elegant and efficient implementation construct for numerous algorithmic problems. Many mainstream languages and runtime environments, however, do not provide a coroutine implementation. Even if they do, these implementations often have less than optimal performance characteristics because of the tradeoff between run time and memory efficiency. As more and more languages are implemented on top of the Java virtual machine (JVM), many of which provide coroutinelike language features, the need for a coroutine implementation has emerged. We present an implementation of coroutines in the JVM that efficiently handles a large range of workloads. It imposes no overhead for applications that do not use coroutines and performs well for applications that do. For evaluation purposes, we use our coroutines to implement JRuby fibers, which leads to a significant speedup of certain JRuby programs. We also present general benchmarks that show the performance of our approach and outline its run-time and memory characteristics.