4 ms·
For the lazy, the features list is quite impressive. JamVM "Features" For those interested in the design of virtual machines, JamVM includes a number of optim
by 616c 12y ago
For the lazy, the features list is quite impressive.
JamVM "Features"
For those interested in the design of virtual machines, JamVM includes a number of optimisations to improve speed and reduce foot-print. A list, in no particular order, is given below.
Execution engine supports many levels of optimisation from basic switched interpreter to inline-threaded interpreter with stack-caching (equivalent performance to a simple JIT).
Uses native threading (posix threads). Full thread implementation including Thread.interrupt()
Object references are direct pointers (i.e. no handles)
Supports class loaders
Efficient thin locks for fast locking in uncontended cases (the majority of locking) without using spin-locking
Two word object header to minimise heap overhead (lock word and class pointer)
Stop-the-world garbage collector, with separate mark/sweep and mark/compact phases to minimise heap fragmentation
Thread suspension uses signals to reduce suspend latency and improve performance (no suspension checks during normal execution)
Full object finalisation support within the garbage collector (with finaliser thread)
Full support for Soft/Weak/Phantom References (with Reference Handler thread)
Full support for class and class-loader garbage-collection and unloading (including associated shared libraries)
Garbage collector can run synchronously or asynchronously within its own thread
String constants within class files are stored in hash table to minimise class data overhead (string constants shared between all classes)
Supports JNI and dynamic loading for use with standard libraries
Uses its own lightweight native interface for internal native methods without overhead of JNI
VM support for invokedynamic (JSR 292)
VM support for type annotations (JSR 308)
VM support for lambda expressions (JSR 335)
VM support for method parameter reflection
JamVM is written in C, with a small amount of platform dependent assembler, and is easily portable to other architectures.