%T Scalable Performance for Scala Message\-Passing Concurrency %A Andrew Bate %E Peter H. Welch, Frederick R. M. Barnes, Jan F. Broenink, Kevin Chalmers, Jan Bækgaard Pedersen, Adam T. Sampson %B Communicating Process Architectures 2013 %X This paper presents an embedded domain\-specific language for building massively concurrent systems. In particular, we demonstrate how ultra\-lightweight cooperatively\-scheduled processes and message\-passing concurrency can be provided for the Scala programming language on the Java Virtual Machine (JVM). We make use of a well\-known continuation\-passing style bytecode transformation in order to achieve performance that is several orders of magnitude higher than native JVM threads. Our library is capable of scaling to millions of processes and messages on a single virtual machine instance, and our runtime system will detect deadlock should it occur. Message\-passing is over 100 times faster than Erlang, and context switching is 1000 times faster than native Java threads. In benchmarks, the performance of our library is close to compiled code.