This is a specialized programming language/compiler speed test/comparison site (http://shootout.alioth.debian.org/) Given the question,
The following is the source code of EF:
// Binary-treespublic class startup class <author = "liigo"> {const int mindepth = 4; public static main () {int time = runtime environment. take start time (); int n = 16; int maxdepth = N; If (mindepth + 2> N) maxdepth = mindepth + 2; int stretchdepth = maxdepth + 1; int check = (treenode. bottomuptree (0, stretchdepth )). itemcheck (); console. output line ("stretch tree of depth", stretchdepth, "/T check:", check); treenode longlivedtree = treenode. bottomuptree (0, maxdepth); For (INT depth = mindepth; depth <= maxdepth; depth + = 2) {int iterations = 1 <(maxdepth-depth + mindepth ); check = 0; For (INT I = 1; I <= iterations; I ++) {check + = (treenode. bottomuptree (I, depth )). itemcheck (); check + = (treenode. bottomuptree (-I, depth )). itemcheck ();} console. output line (iterations * 2), "/T trees of depth", depth, "/T check:", check);} console. output line ("long lived tree of depth", maxdepth, "/T check:", longlivedtree. itemcheck (); console. output line ("Time (MS):", runtime environment. take the start time ()-time); console. input text ();} private class treenode {private treenode left, right; private int item; Public Init (INT item) {This. item = item;} public static treenode bottomuptree (INT item, int depth) {If (depth> 0) {return New treenode (bottomuptree (2 * item-1, depth-1), bottomuptree (2 * item, depth-1), item);} else {return New treenode (item) ;}} public Init (treenode left, treenode right, int item) {This. left = left; this. right = right; this. item = item;} public int itemcheck () {// if necessary deallocate hereif (Left = NULL) return item; else return item + left. itemcheck ()-Right. itemcheck ();}}}
This EF program runs on my machine for about 108 seconds.The optimized vc6 takes about 6.9 seconds.
Other Programming Language/compiler performance, please see here: http://shootout.alioth.debian.org/gp4/benchmark.php? Test = binarytrees & lang = all
For this test, EF is the worst since the start of the competition, which is slower than most languages and faster than Ruby, PHP, JavaScript, Perl, TCL and REBOL. The two features of this test are recursion and the creation of a large number of small objects (about 30 million). EF does not seem to be doing well in these two aspects.
(The performance of vc6 is also poor .)
There are still a lot of test questions to continue. To learn EF language, please go to EF official blog: http://blog.csdn.net/efdev/