Software - Ropes For Java

What Is It?

A rope is a high performance replacement for Strings. The datastructure, described in detail in "Ropes: an Alternative to Strings", provides asymptotically better performance than both String and StringBuffer for common string modifications like prepend, append, delete, and insert. Like Strings, ropes are immutable and therefore well-suited for use in multi-threaded programming.

Visit releases to download the latest version.


This rope implementation for Java is provided under the terms of the GNU General Public License. For alternative licensing, please contact me.

Notes on ICFP 2007

The 10th Annual ICFP Programming Contest (main site) required a string data structure with sub-linear prepend performance in order to compete effectively. Using a mutable string with linear-time prepend performance, the fastest Java implementation I produced of the DNA-to-RNA converter ran at 50 iterations per second. Substituting in the Ropes for Java library allowed me to achieve speeds of roughly 50,000 iterations per second— 3 orders of magnitude faster!

Additional Support

YourKit is kindly supporting open source projects with its full-featured Java Profiler. YourKit, LLC is creator of innovative and intelligent tools for profiling Java and .NET applications. Take a look at YourKit's leading software products: YourKit Java Profiler and YourKit ASP.NET Profiler.


Please feel free to send me an email with any comments, especially bugs.