You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just informative, mostly to make sure that the regex implementation is not too problematic given ua-parser/uap-rust@a6c3036
This is a slice of time -l running python -mua_parser bench samples/useragents.txt
run time (seconds)
maximum rss
peak memory footprint
3.12-basic
33.61
42041344
30148544
3.12-basic-sieve-5000
11.67
45400064
29673280
3.12-basic-sieve-50000
9.67
55623680
30000960
3.12-re2
2.74
81657856
29476864
3.12-regex
1.32
163594240
29214528
graalpy-basic
107.61
1542012928
29181824
graalpy-basic-sieve-50000
37.27
1110573056
30590976
pypy-basic
230.88
119734272
29624384
pypy-basic-sieve-50000
42.30
130744320
30296064
so...
I have no idea what the hell macos's "peak memory footprint" means (it's lower than the maximum rss, and basically the same for all implementations which makes no sense)
the regex implementation is in fact quite memory intensive, this is consistent with previous findings (ua-parser/uap-rust@1af15c1) surprisingly running more stuff on top does not actually fix the issue in any way
although caches are not free, and they don't come close to the speed of a native implementation, they turn out not to have that much of an overhead in the grand scheme of things12
Footnotes
although the bench currently pessimises regex quite a bit, and re2 a bit (to a lesser extent) because it uses eager matchers rather than lazy, so it compiles every regular expression in the set even though regex needs none of that, maybe I should add a toggle for that ↩
also wtf graal why do you use less memory with a cache? ↩
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Just informative, mostly to make sure that the
regex
implementation is not too problematic given ua-parser/uap-rust@a6c3036This is a slice of
time -l
runningpython -mua_parser bench samples/useragents.txt
42041344
30148544
45400064
29673280
55623680
30000960
81657856
29476864
163594240
29214528
1542012928
29181824
1110573056
30590976
119734272
29624384
130744320
30296064
so...
regex
implementation is in fact quite memory intensive, this is consistent with previous findings (ua-parser/uap-rust@1af15c1) surprisingly running more stuff on top does not actually fix the issue in any wayFootnotes
although the bench currently pessimises regex quite a bit, and re2 a bit (to a lesser extent) because it uses eager matchers rather than lazy, so it compiles every regular expression in the set even though regex needs none of that, maybe I should add a toggle for that ↩
also wtf graal why do you use less memory with a cache? ↩
Beta Was this translation helpful? Give feedback.
All reactions