/mobile Handheld Friendly website
x64 Ubuntu : Intel® Q6600® one core |
Each table row shows performance measurements for this Dart program with a particular command-line input value N.
| N | CPU secs | Elapsed secs | Memory KB | Code B | ≈ CPU Load |
|---|---|---|---|---|---|
| 250,000 | Failed | 443 |
Read the ↓ make, command line, and program output logs to see how this program was run.
Read reverse-complement benchmark to see what this program should do.
Dart VM version: 0.4.7.1_r21537 (Tue Apr 16 01:34:51 2013)
/* The Computer Language Benchmarks Game http://benchmarksgame.alioth.debian.org/ Contributed by Thomas Sahlin Lookup table optimization by Alex Tatumizer */ import 'dart:io'; void main() { var src = "CGATMKRYVBHD"; var dst = "GCTAKMYRBVDH"; var tbl = new List<int>(256); var seq = new List<int>(); // Set up lookup table for (int i = 0; i < tbl.length; i++) tbl[i] = i; for (int i = 0; i < src.length; i++) { tbl[src.codeUnitAt(i)] = dst.codeUnitAt(i); tbl[src.toLowerCase().codeUnitAt(i)] = dst.codeUnitAt(i); } // Function to print the sequences in reverse order void printSeq() { for (int i = seq.length - 60; i >= 0; i -= 60) { var line = seq.getRange(i, 60); print(new String.fromCharCodes(line.reversed.toList())); } if (seq.length % 60 > 0) { var line = seq.getRange(0, seq.length % 60); print(new String.fromCharCodes(line.reversed.toList())); } } // Start processing stdin .transform(new StringDecoder()) .transform(new LineTransformer()) .listen((String line) { if (line.startsWith(">")) { // Comment line - output the previous sequence and the comment printSeq(); print(line); // Start a new sequence seq.clear(); } else { // Translate characters and add them to the sequence for (int byte in line.codeUnits) seq.add(tbl[byte]); } }, onDone: () { printSeq(); }); }
Tue, 16 Apr 2013 19:00:21 GMT COMMAND LINE: /usr/local/src/dart-sdk/bin/dart --old_gen_heap_size=2048 revcomp.dart 0 < revcomp-input250000.txt PROGRAM FAILED PROGRAM OUTPUT: >ONE Homo sapiens alu #0 IterableMixinWorkaround._rangeCheck (dart:_collection-dev:852:7) #1 IterableMixinWorkaround.getRangeList (dart:_collection-dev:856:16) #2 List.getRange (dart:core-patch:1121:48) #3 main.printSeq (file:///home/dunham/benchmarksgame_onecore/revcomp/tmp/revcomp.dart:30:30) #4 main.<anonymous closure> (file:///home/dunham/benchmarksgame_onecore/revcomp/tmp/revcomp.dart:51:17) #5 _StreamSubscriptionImpl._sendData (dart:async:1576:12) #6 _StreamImpl._sendData.<anonymous closure> (dart:async:1352:29) #7 _SingleStreamImpl._forEachSubscriber (dart:async:1436:11) #8 _StreamImpl._sendData (dart:async:1350:23) #9 _StreamImpl._add (dart:async:1152:16) #10 StreamController.add.add (dart:async:1067:35) Unhandled exception: RangeError: value 60 not in range 499940..500000 #0 _throwDelayed.<anonymous closure> (dart:async:1123:5) #1 _asyncRunCallback._asyncRunCallback (dart:async:34:17) #2 _asyncRunCallback._asyncRunCallback (dart:async:44:9) #3 Timer.run.<anonymous closure> (dart:async:2240:21) #4 Timer.run.<anonymous closure> (dart:async:2248:13) #5 Timer.Timer.<anonymous closure> (dart:async-patch:15:15) #6 _Timer._createTimerHandler._handleTimeout (dart:io:6721:28) #7 _Timer._createTimerHandler._handleTimeout (dart:io:6729:7) #8 _Timer._createTimerHandler.<anonymous closure> (dart:io:6737:23) #9 _ReceivePortImpl._handleMessage (dart:isolate-patch:81:92)