Dictionary<int, int> t = new Dictionary<int, int> ();
Заполнение
1218
902
865
863
873
Чтение
239
220
228
224
220
Заполнение
1218
902
865
863
873
Чтение
239
220
228
224
220
JCF | Colt | Trove | PCJ | Fastutil |
11627 | 1175 | 881 | 784 | 1688 |
9031 | 1253 | 950 | 722 | 1734 |
7882 | 1252 | 881 | 714 | 1675 |
10463 | 1008 | 1035 | 724 | 1703 |
4581 | 1065 | 1040 | 611 | 1780 |
JCF | Colt | Trove | PCJ | Fastutil |
2116 | 119 | 76 | 69 | 907 |
4435 | 96 | 63 | 57 | 888 |
2052 | 93 | 71 | 56 | 898 |
3889 | 91 | 70 | 56 | 903 |
2131 | 92 | 71 | 55 | 962 |
java | 5 | 1 | 0 | 0 | 0 | |
Erlang | 2185 | 2162 | 2160 | 2158 | 2190 | |
Basic | 870 | 867 | 860 | 860 | 860 | |
Pascal | 323 | 316 | 315 | 314 | 314 | |
Mono | 510 | 511 | 510 | 511 | 510 | |
Bash | 24167 | 24141 | 24112 | 24069 | 24080 | C=1000000 |
MySql | 35660 | - | - | - | - | C=10000000 |
Ruby | 36462 | 36558 | 36718 | 36677 | 36511 | |
C++ | 321 | 316 | 317 | 324 | 314 | |
C | 318 | 284 | 281 | 287 | 281 | |
PHP | 25652 | 25643 | 26877 | 27133 | 25590 | |
ActionScript3 | 393 | 424 | 419 | 393 | 404 | |
JavaScript Firefox 5 | 963 | 972 | 984 | 946 | 948 | |
JavaScript Opera 11.50 | 993 | 982 | 996 | 989 | 973 | |
JavaScript Google Chrome 12.0.742.124 | 897 | 894 | 894 | 894 | 894 | |
JavaScript Firefox 3.6.13 | 7621 | 7596 | 7588 | 7586 | 7598 | |
Python | 10153 | 9966 | 9965 | 9964 | 9982 |
Java | 5 | 2 | 0 | 0 | 0 | |
C | 361 | 328 | 328 | 329 | 328 | |
C++ | 347 | 347 | 347 | 348 | 347 | G++ |
C++ | 86 | 78 | 77 | 77 | 77 | BCC |
C++ | 2164 | 2147 | 2153 | 2149 | 2144 | DMC |
PHP | 11440 | 11550 | 11500 | 11510 | 11480 | |
JS Firefox 5.0 | 1905 | 1900 | 1902 | 1905 | 1899 | |
JS Firefox 3.6.17 | 797 | 792 | 793 | 796 | 794 | |
JS Chrome 12.0.742.122 | 1126 | 1110 | 1112 | 1113 | 1110 | |
JS Internet Explorer 9 (9.0.8112.16421) | 244 | 199 | 202 | 204 | 203 | |
JS Internet Explorer 9 (9.0.8112.16421) 64-bit Edition | 7865 | 7856 | 8040 | 8212 | 8405 | |
JS Opera 11.50 сборка 1074 | 911 | 901 | 913 | 908 | 908 | |
Oberon-2 | 8039 | 8043 | 8046 | 8030 | 8039 | Oxford Oberon-2 |
#!/bin/bash
t=0
while [ $t -lt 5 ]
do
s=$(($(date +%s%N)/1000000))
i=0
x=0
while [ $i -lt 1000000 ]
do
x=$[$i/10]
i=$[$i+1]
done
e=$(($(date +%s%N)/1000000))
r=$[$e-$s]
echo $r
t=$[$t+1]
done
24167 24141 24112 24069 24080
ЯП | №1 | №2 | №3 | №4 | №5 | Версия |
Java | 5 | 2 | 0 | 0 | 0 | java version "1.6.0_24" Java(TM) SE Runtime Environment (build 1.6.0_24-b07) Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02, mixed mode) |
C | 361 | 328 | 328 | 329 | 328 | gcc.EXE (GCC) 4.5.2 |
C++ | 347 | 347 | 347 | 348 | 347 | g++.EXE (GCC) 4.5.2 |
C++ | 86 | 78 | 77 | 77 | 77 | Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland |
C++ | 2164 | 2147 | 2153 | 2149 | 2144 | Digital Mars Compiler Version 8.42n |
PHP | 11.44s | 11.55s | 11.50s | 11.51s | 11.48s | PHP 5.3.3 (cli) (built: Jul 21 2010 20:36:55) Copyright (c) 1997-2010 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies |
JS | 1905 | 1900 | 1902 | 1905 | 1899 | Mozilla Firefox 5.0 |
JS | 797 | 792 | 793 | 796 | 794 | Mozilla Firefox 3.6.17 |
JS | 1126 | 1110 | 1112 | 1113 | 1110 | Google Chrome 12.0.742.122 |
JS | 244 | 199 | 202 | 204 | 203 | Internet Explorer 9 (9.0.8112.16421) |
JS | 7865 | 7856 | 8040 | 8212 | 8405 | Internet Explorer 9 (9.0.8112.16421) 64-bit Edition |
JS | 911 | 901 | 913 | 908 | 908 | Opera 11.50 сборка 1074 |
Oberon-2 | 8039 | 8043 | 8046 | 8030 | 8039 | Oxford Oberon-2 compiler version 2.5.1 |
Upd:
Код
С++
#include <sys/timeb.h>
#include <stdio.h>
void test ()
{
struct timeb start, end;
ftime(&start);
int count = 100000000;
for (int i=0; i < count; ++i)
int x = i/10;
ftime(&end);
long mtime = ((end.time - start.time) * 1000 + end.millitm - start.millitm);
printf("%ld\n", mtime);
}
int main (void)
{
for (int i=0; i < 5; i++)
test ();
}
Oberon-2
MODULE testo2;
IMPORT Timer, Out;
VAR
t:INTEGER;
PROCEDURE test;
VAR
s,e,i,max:INTEGER;
x:REAL;
BEGIN
max := 100000000;
i := 0;
s := Timer.Now();
WHILE i < max DO i := i+1; x:=i / 10; END;
e := Timer.Now();
Out.Int (e-s, 1);
Out.Ln;
END test;
BEGIN
t:=0;
WHILE t < 5 DO t := t+1; test END;
END testo2.