For this test, the C implementation is the king of the hill, with gcc 4. 6 giving the best performance. The gcc compiler is followed by RenderScript and clang 3.
4, and the two Java implementations are at the back of the pack, with Dalvik giving the worst performance. Old BASIC: RTB: 10 REM TOSS A COIN 20 c = RND ( 2) 30 IF c = 0 THEN GOTO 100 40 PRINT " Tails" 50 PRINT " Try again " ; 60 INPUT t$ 70 IF t$ = " y" THEN GOTO 20 PRINT " Heads" 110 GOTO 50.
Условные обозначения: ® - для полноценного функционирования программы необходимы права root.