programming:general:phpvspythonvsperl
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
programming:general:phpvspythonvsperl [2008/02/04 16:49] – crustymonkey | programming:general:phpvspythonvsperl [2008/04/14 13:55] (current) – crustymonkey | ||
---|---|---|---|
Line 367: | Line 367: | ||
===== Just For Fun... ===== | ===== Just For Fun... ===== | ||
...one of my co-workers whipped up this C code which uses '' | ...one of my co-workers whipped up this C code which uses '' | ||
+ | |||
+ | |||
Line 400: | Line 402: | ||
re[i] = pcre_compile(pat[i], | re[i] = pcre_compile(pat[i], | ||
if (!re[i]) { | if (!re[i]) { | ||
- | errx(1, " | + | errx(1, " |
err_offset, pat[i], err_txt); | err_offset, pat[i], err_txt); | ||
} | } | ||
Line 414: | Line 416: | ||
counter++; | counter++; | ||
break; | break; | ||
- | } | ||
- | } | ||
- | } | ||
- | |||
- | if (!(f = fopen(logfile, | ||
- | |||
- | while ((s = fgets(buf, sizeof(buf), | ||
- | for (i = 0; pat[i]; i++) { | ||
- | match = pcre_exec(re[i], | ||
- | 0, 0, ovec, 30); | ||
- | if (match > 0) { | ||
- | counter++; | ||
} | } | ||
} | } | ||
Line 442: | Line 432: | ||
$ cc -Wall -o pcretest pcretest.c -I/ | $ cc -Wall -o pcretest pcretest.c -I/ | ||
</ | </ | ||
+ | |||
+ | |||
Line 449: | Line 441: | ||
=== The Sun Box === | === The Sun Box === | ||
| ^ Real ^ User ^ Sys ^ | | ^ Real ^ User ^ Sys ^ | ||
- | ^ Test 1 | 8.66s | 7.03s | 0.06s | | + | ^ Test 1 | **6.70s** |
- | ^ Test 2 | 6.53s | 6.25s | 0.10s | | + | ^ Test 2 | 8.03s |
- | ^ Test 3 | 7.02s | 6.69s | 0.04s | | + | ^ Test 3 | 9.04s |
- | ^ Test 4 | 7.12s | 6.68s | 0.10s | | + | ^ Test 4 | 9.03s |
- | ^ Test 5 | 6.62s | 6.35s | 0.09s | | + | ^ Test 5 | 7.26s |
+ | === The Laptop === | ||
+ | |||
+ | | ^ Real ^ User ^ Sys ^ | ||
+ | ^ Test 1 | 13.14s | ||
+ | ^ Test 2 | 13.08s | ||
+ | ^ Test 3 | 13.09s | ||
+ | ^ Test 4 | 13.21s | ||
+ | ^ Test 5 | **13.07s** | ||
===== Conclusion ===== | ===== Conclusion ===== |
programming/general/phpvspythonvsperl.1202143756.txt.gz · Last modified: 2008/02/04 16:49 by crustymonkey