Cibyl performance

From SpelWiki

This page describes Cibyl performance. See the programming for Cibyl page for a set of guidelines to get good performance with Cibyl. Both these benchmarks emphasise computational performance, applications which make use of the J2ME API should perform equally good or bad with both Cibyl and native Java.

Benchmarks

The numbers are given as number of seconds to execute a given benchmark. The startup time is disregarded, only the execution of the algorithm is included. They were compiled with all default optimizations enabled in cibyl-mips2java and the Java assembly was post-processed by the peephole optimizer. The colors denote a slowdown compared to native Java:

  • Green for a slowdown < 1.20
  • Orange for a slowdown 1.20 ... 1.80
  • Red for a slowdown > 1.80

A*

The A* benchmark uses a Java version which is written in "Java-style" with regards to class usage etc. The acutal algorithm and support functionality is implemented in the same way by the same programmer for both languages. This benchmark emphasises pointer/reference following and dynamic memory allocation (although we have tried to minimize the use of malloc/new)

JVM C (Cibyl) Java Cibyl/Java (slowdown)
Gij 1.2268 0.6238 1.97
Kaffe 0.1089 1.0649 0.10
SableVM 0.9560 0.5320 1.80
Sun JDK0.1390 0.1002 1.39

Two interesting things: Note the huge differences between the JVMs (almost a factor of 10) and also note how extremely well Cibyl performs in Kaffe.

Game of life

Emphasises memory accesses (which are more expensive in Cibyl). GCC was able to optimize the game of life implementation very well, which gives very good results for Cibyl in general.

JVM C (Cibyl) Java Cibyl/Java (slowdown)
Gij 25.6131 28.5439 0.90
Kaffe 2.3426 2.302 1.02
SableVM 20.0237 18.9271 1.06
Sun JDK 1.1712 1.3431 0.87