• [^] # Re: popen?

    Posté par . En réponse au journal Problème de fopen..... Évalué à 3.

    Ok - c'est plus du chipotage c'est de l'enculage de mouche à ce niveau-là :) pour être cohérent tu dois banir tout langage autre que l'assembleur et le C alors ? (voire le caml) parce que question appels de bibliothèque et de syscalls les langages interprétés c'est la joie dans les chaumières.

    [gc@meuh /tmp] echo 'main() { printf("hello world\n"); }' > t.c
    [gc@meuh /tmp] gcc t.c
    [gc@meuh /tmp] strace -o c.out ./a.out
    hello world

    [gc@meuh /tmp] strace -f -o bash.out bash -c 'echo "hello world"'
    hello world

    [gc@meuh /tmp] strace -f -o python.out python -c 'print "hello world"'
    hello world

    [gc@meuh /tmp] strace -f -o perl.out perl -e 'print "hello world\n"'
    hello world

    [gc@meuh /tmp] echo 'public class t { public static void main( String args[] ) { System.out.println("Hello world"); } }' > t.java
    [gc@meuh /tmp] javac t.java
    [gc@meuh /tmp] strace -f -o java.out java t
    Hello world

    [gc@meuh /tmp] echo 'print_string "Hello World\n"' > t.ml
    [gc@meuh /tmp] strace -f -o ocaml.out ocaml t.ml
    Hello World

    [gc@meuh /tmp] ocamlc t.ml
    [gc@meuh /tmp] strace -f -o ocamlc.out ./a.out
    Hello World

    [gc@meuh /tmp] wc -l *.out | sort -n
    25 c.out
    81 ocamlc.out
    84 bash.out
    100 perl.out
    159 ocaml.out
    522 python.out
    2990 java.out

    On notera la belle performance de notre ami Java. Et que vraiment Python, par rapport à Perl, ça sux grave.

    Disclémeur : ok je mesure essentiellement le startup là :/