Running "pike -x benchmark" using a fairly recent pike 7.7, I get really bad results on the "Tag removal u. Regexp.PCRE" test. So bad that I've actually never bothered to let it finish, it just sits there sucking up CPU for a long time. If I change the number of times the test is run from 2000 to 200 I can see that it actually does work, its just incredibly slow.
Is this normal, or is my PCRE lib performing horribly badly for some reason? Here's what it looks like after changing n to be 200 instead of 2000 in Tools.pmod/Shoot.pmod/TagRemovePCRE.pike
Tag removal u. array_sscanf 3.936s 3.135s ? (2) (96 /s) Tag removal u. division.... 3.909s 3.055s ? (2) (65 /s) Tag removal using a loop... 4.081s 3.070s ? (2) (16 /s) Tag removal u. Regexp.PCRE.161.214s 143.930s ? (1) (1 /s) Tag removal u. Parser.HTML. 5.003s 4.590s ? (1) (65 /s) Tag removal u. search...... 5.088s 4.680s ? (1) (64 /s) Tag removal using sscanf...24.450s 22.770s ? (1) (1 /s)
Thanks Adam
Running "pike -x benchmark" using a fairly recent pike 7.7, I get really bad results on the "Tag removal u. Regexp.PCRE" test. So bad that I've actually never bothered to let it finish, it just sits there sucking up CPU for a long time. If I change the number of times the test is run from 2000 to 200 I can see that it actually does work, its just incredibly slow.
Is this normal, or is my PCRE lib performing horribly badly for some reason? Here's what it looks like after changing n to be 200 instead of 2000 in Tools.pmod/Shoot.pmod/TagRemovePCRE.pike
Tag removal u. array_sscanf 3.936s 3.135s ? (2) (96 /s) Tag removal u. division.... 3.909s 3.055s ? (2) (65 /s) Tag removal using a loop... 4.081s 3.070s ? (2) (16 /s) Tag removal u. Regexp.PCRE.161.214s 143.930s ? (1) (1 /s) Tag removal u. Parser.HTML. 5.003s 4.590s ? (1) (65 /s) Tag removal u. search...... 5.088s 4.680s ? (1) (64 /s) Tag removal using sscanf...24.450s 22.770s ? (1) (1 /s)
Pike 7.7.24 build 1402, G4 @ 1.5GHz:
----8<----8<----8<----8<---- test total user mem (runs) Pike start overhead........ 0.377s 0.001s ? (14) Ackermann.................. 1.584s 1.017s ? (4) Append array............... 1.492s 1.033s ? (4) (484262/s) Append mapping............. 2.750s 2.025s ? (2) (4938/s) Append multiset............ 0.994s 0.590s ? (6) (16949/s) Array & String Juggling.... 3.192s 2.255s ? (2) Read binary INT16.......... 0.937s 0.347s ? (6) (2884616/s) Read binary INT32.......... 4.793s 2.560s ? (2) (195312/s) Read binary INT128......... 1.432s 0.860s ? (4) (11628/s) Clone null-object.......... 0.759s 0.327s ? (7) (917031/s) Clone object............... 1.095s 0.566s ? (5) (530035/s) Compile.................... 2.427s 1.660s ? (3) (14542 lines/s) Compile & Exec............. 2.232s 1.480s ? (3) (406351 lines/s) GC......................... 2.507s 1.100s ? (2) Insert in mapping.......... 1.763s 0.523s ? (3) (955414/s) Insert in multiset......... 1.753s 1.057s ? (3) (473186/s) Matrix multiplication...... 0.936s 0.505s ? (6) Loops Nested (local)....... 0.732s 0.331s ? (7) (50620908 iters/s) Loops Nested (global)...... 1.060s 0.560s ? (5) (29959314 iters/s) Loops Recursed............. 1.304s 0.692s ? (4) (1514189 iters/s) Replace (parallel)......... 6.513s 5.180s ? (1) (772 repl/s) Replace (serial)........... 4.305s 3.550s ? (2) (1127 repl/s) Sort equal integers........ 1.301s 0.707s ? (4) Sort ordered integers...... 1.145s 0.620s ? (5) Sort unordered integers.... 1.701s 1.180s ? (3) Sort unordered objects..... 2.498s 1.707s ? (3) Tag removal u. array_sscanf 4.009s 3.115s ? (2) (96 /s) Tag removal u. division.... 4.090s 3.090s ? (2) (65 /s) Tag removal using a loop... 3.727s 3.010s ? (2) (17 /s) Tag removal u. Regexp.PCRE.494.239s 460.850s ? (1) (4 /s) Tag removal u. Parser.HTML. 3.072s 2.545s ? (2) (118 /s) Tag removal u. search...... 3.996s 3.355s ? (2) (89 /s) Tag removal using sscanf... 7.822s 7.140s ? (1) (3 /s) ---->8---->8---->8---->8----
I don't know if it's normal, but the test cases (when written by me at least) are timed to take around 0.5-1s each.
Which already that seems broken.
% pike -x benchmark -t*PCRE* test total user mem (runs) Tag removal u. Regexp.PCRE.23.295s 23.210s 8104kb (1) (86 /s)
Did someone change it to be more competent, but much heavier on PCRE, maybe? Without changing the loop amount?
pike-devel@lists.lysator.liu.se