Page 1 of 1
Computer Language Shootout!
Posted: Sat Mar 17, 2007 3:46 pm
by AmmarkoV
Computer Languages Shootout
Το βρήκα εδώ!
Είναι benchmarks σε Gentoo σύστημα οπού βάζεις πολλαπλασιαστές δεξιά σχετικά με αυτά στα οποία θέλεις να είναι καλός ένας compiler και σου βγάζει αποτελέσματα.. Τα αποτελέσματα είναι από σύστημα με P4 CPU
Οι κορυφαίες overall γλώσσες/compilers C (gcc) , C++ (g++) ενώ η Pascal (Free Pascal

) τα πάει πολύ καλά δικαιώνοντας την αγάπη μου! :smt060
Μούχαχα!
Python , PHP , Java , C# (Mono) σέρνονται κάπου στην μέση..
Λέει πάνω πάνω
Can you manipulate the multipliers and weights to make your favourite language the fastest programming language in the Shootout?
Επίσης στο startup test η java κάνει 36.22 secs για να εκτελέσει το εξής
Code: Select all
public class hello {
public static void main(String args[]) {
System.out.print("hello world\n");
}
}
Και να το καλέσει
repeat %A /opt/sun-jdk-1.6.0/bin/java $JDKFLAGS -server -classpath hello.java_run hello
Ενώ η C (GCC) 0.39 secs
Code: Select all
int main() {
fputs("hello world\n", stdout);
return(0);
}
Και να το καλέσει
repeat %A hello.gcc_run
Και η Pascal 0.28 secs
Code: Select all
program hello;
begin
WriteLn('hello world');
end.
Και να το καλέσει
repeat %A hello.fpascal_run
Συνάδελφοι τα σχόλια σας..
Re: Computer Language Shootout!
Posted: Thu Mar 29, 2007 4:50 pm
by Babedacus
AmmarkoV wrote:Gentoo P4 CPU
κορυφαίες γλώσσες/compilers C (gcc),C++ (g++),Pascal (Free Pascal)
Μούχαχα!
Python, PHP,Java,C# (Mono) σέρνονται κάπου στην μέση..
Ε λογικό είναι ρε συ αφού έχει πέντιουμ 4,αν είχε Java Bytecode επεξεργαστή (ARM926EJ-S) θα κέρδιζε η Java και οι άλλες γλώσσες θα χάνανε.

Όταν όμως καταφέρει η ανθρωπότητα να φκιάσει επεξεργαστή αντάξιο της Java,τότε η σύγχυση των γλωσσών θα πάψει και θα ζούμε για να υμνούμε τον ένα και μόνο δημιουργό,τον James.

Posted: Thu Mar 29, 2007 5:41 pm
by AmmarkoV
Babedacus++

Posted: Thu Mar 29, 2007 6:40 pm
by HdkiLLeR
Χμμ..παλιά μου αγάπη (Haskell) δεν πάει και άσχημα

Posted: Fri Mar 30, 2007 9:34 am
by AnINffected
Τα βάρη πώς λείτουργούν ακριβώς;
Σωστά τα λέει ο Babedacus!
Οι interpreted γλώσσες γενικά λογικό δεν είναι να έχουν το συγκριτικό μειονέκτημα έναντι των executed;
Ας μετρούσε και compile time και όχι μόνο run time...
Πολύ ενδιαφέρον πάντως.
Υ.Γ. Άλα τις η D! (Digital Mars)! Μόλις πιό κάτω από τις C/C++;
Εντυπωσιάστηκα τώρα...
Υ.Γ.2. H C++ είναι η προσωπική μου αγαπημένη!
Λίγο ακόμη και δεν θα χρειαζόταν tweaking...

Posted: Fri Mar 30, 2007 10:34 am
by PaP
Ετσι να βγάλετε τα μάτια σας !!
Δε με ενδιαφέρει τη αγαπάει το μηχάνημα αλλά τι αγάπανε οι άνθρωποι και αυτό λέγεται Ruby :P
Τόσα τραγούδια υπάρχουν
In Ruby's arms - Tom Waits
Ruby Tuesday - Rolling Stones
Ruby - Kaiser Chiefs
Posted: Fri Mar 30, 2007 5:05 pm
by AmmarkoV
AnINffected η Java δεν είναι εντελώς interpreted..
Java wrote:"Remember how HotSpot works. It starts by running your program with an interpreter. When it discovers that some method is "hot" -- that is, executed a lot, either because it is called a lot or because it contains loops that loop a lot -- it sends that method off to be compiled. After that one of two things will happen, either the next time the method is called the compiled version will be invoked (instead of the interpreted version) or the currently long running loop will be replaced, while still running, with the compiled method. The latter is known as "on stack replacement" and exists in the 1.3/1.4 HotSpot based systems."
Άνοιξα λίγο Ruby
Αλλά ρε PaP πολύ ασυνταξία..
Οι εντολές βέβαια είναι πολύ μεστές αλλά περίεργες (!)
Βέβαια το καλό είναι οτι μπορείς να χρησιμοποιήσεις DLL`s κτλ οπότε θα επιταχύνεται το πράμα (γράφοντας parts σε άλλη γλώσσα βέβαια) αλλά είναι τέρμα αργή από ότι δείχνει το benchmark..
Code: Select all
# Output "I love Ruby"
say = "I love Ruby"
puts say
# Output "I *LOVE* RUBY"
say['love'] = "*love*"
puts say.upcase
# Output "I *love* Ruby"
# five times
5.times { puts say }
Code: Select all
class Numeric
def plus(x)
self.+(x)
end
end
y = 5.plus 6
# y is now equal to 11
Φοβερό comment στο site είναι αυτό..
They raced up, and down, and around and around and around, and forwards and backwards and sideways and upside-down.
Cheetah's friends said "it's not fair" - everyone knows Cheetah is the fastest creature but the races are too long and Cheetah gets tired!
Falcon's friends said "it's not fair" - everyone knows Falcon is the fastest creature but Falcon doesn't walk very well, he soars across the sky!
Horse's friends said "it's not fair" - everyone knows Horse is the fastest creature but this is only a yearling, you must stop the races until a stallion takes part!
Man's friends said "it's not fair" - everyone knows that in the "real world" Man would use a motorbike, you must wait until Man has fueled and warmed up the engine!
Snail's friends said "it's not fair" - everyone knows that a creature should leave a slime trail, all those other creatures are cheating!
Dalmation's tail was banging on the ground. Dalmation panted and between breaths said "Look at that beautiful mountain, let's race to the top!"
Posted: Fri Mar 30, 2007 7:06 pm
by PaP
Και τι να την κάνεις την ταχύτητα με τους σημερινούς υπολογιστές ; Ολοι τα μηχανήματα κατά κύριο λόγω είναι idle και αν δε μιλάς με υλικό ή δεν κάνεις critical εφαρμογή (που δεν είναι και ότι πιο συχνό) γιατί να μη γράψεις κάτι lean and clean και να στο επικεντρωθείς sta features και όχι στην υλοποίηση...
Ruby/Python rules