diff options
author | Joey Hess <joey@kitenet.net> | 2010-11-27 23:29:23 +0000 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2010-11-27 23:29:23 +0000 |
commit | 3650d0265bc501219bc6d5cd4fa91a6b6ecd793a (patch) | |
tree | bc69471b66086744218a6f402d6f055eca037de0 /doc/recentchanges/change_9a7387a53be2b1e182003f3e86cb76d7f10c4b67._change | |
parent | 6e97574598534c4d81d2039bc044ceceaaf44fbd (diff) |
Diffstat (limited to 'doc/recentchanges/change_9a7387a53be2b1e182003f3e86cb76d7f10c4b67._change')
-rw-r--r-- | doc/recentchanges/change_9a7387a53be2b1e182003f3e86cb76d7f10c4b67._change | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/doc/recentchanges/change_9a7387a53be2b1e182003f3e86cb76d7f10c4b67._change b/doc/recentchanges/change_9a7387a53be2b1e182003f3e86cb76d7f10c4b67._change new file mode 100644 index 000000000..335d14a87 --- /dev/null +++ b/doc/recentchanges/change_9a7387a53be2b1e182003f3e86cb76d7f10c4b67._change @@ -0,0 +1,76 @@ +[[!meta author="""joey"""]] + +[[!meta authorurl="""http://ikiwiki.info/ikiwiki.cgi?page=users%2Fjoey&do=goto"""]] + +[[!meta title="""change to todo/Improving_the_efficiency_of_match__95__glob on ikiwiki"""]] + +[[!meta permalink="http://ikiwiki.info/recentchanges/#change-9a7387a53be2b1e182003f3e86cb76d7f10c4b67"]] + +<div id="change-9a7387a53be2b1e182003f3e86cb76d7f10c4b67" class="metadata"> +<span class="desc"><br />Changed pages:</span> +<span class="pagelinks"> + +<a href="http://git.ikiwiki.info/?p=ikiwiki;a=blobdiff;f=doc/todo/Improving_the_efficiency_of_match__95__glob.mdwn;h=0fc059ad7d169c2e35f3ea869bdc2f69be649857;hp=43571ead77346a1c5528360eec0e369958f2de7c;hb=9a7387a53be2b1e182003f3e86cb76d7f10c4b67;hpb=ab96249d5ad8f3ee9275be3fef9e3467b8f3ffdf" title="diff" rel="nofollow">[[diff|wikiicons/diff.png]]</a><a href="http://ikiwiki.info/ikiwiki.cgi?page=todo%2FImproving_the_efficiency_of_match__95__glob&do=goto" rel="nofollow">todo/Improving the efficiency of match_glob</a> + + +</span> +<span class="desc"><br />Changed by:</span> +<span class="committer"> + +<a href="http://ikiwiki.info/ikiwiki.cgi?page=users%2Fjoey&do=goto" rel="nofollow">joey</a> + +</span> +<span class="desc"><br />Commit type:</span> +<span class="committype">git</span> +<span class="desc"><br />Date:</span> +<span class="changedate"><span class="relativedate" title="Tue, 16 Nov 2010 13:19:13 -0400">13:19:13 11/16/10</span></span> +<span class="desc"><br /></span> +</div> + +<span class="revert"> +<a href="http://ikiwiki.info/ikiwiki.cgi?rev=9a7387a53be2b1e182003f3e86cb76d7f10c4b67&do=revert" title="revert" rel="nofollow">[[revert|wikiicons/revert.png]]</a> +</span> + +<div class="changelog"> + + +thoughts<br /> + + +</div> + +<div class="diff"> +<pre> +diff --git a/doc/todo/Improving_the_efficiency_of_match__95__glob.mdwn b/doc/todo/Improving_the_efficiency_of_match__95__glob.mdwn +index 43571ea..0fc059a 100644 +--- a/doc/todo/Improving_the_efficiency_of_match__95__glob.mdwn ++++ b/doc/todo/Improving_the_efficiency_of_match__95__glob.mdwn +@@ -22,6 +22,23 @@ Here's my patch - please consider it! -- [[KathrynAndersen]] + + >>>>> I think it's because my patch focuses on match_glob while the memoize patch focuses on `glob2re`, and `glob2re` is called in `filecheck`, `meta` and `po` as well as in `match_glob` and `match_user`; thus the memoized `glob2re` is dealing with a bigger set of globs to look up, and thus could be just that little bit slower. -- [[KathrynAndersen]] + ++>>>>>> What may be going on is that glob2re is already a fairly fast ++>>>>>> function, so the overhead of memoizing it with the very generic ++>>>>>> `_memoizer` (see its source) swamps the memoization gain. Note ++>>>>>> that the few functions memoized with the Memoizer before were much ++>>>>>> more expensive, so that little overhead was acceptable then. ++>>>>>> ++>>>>>> It also may be that Kathryn's patch is slightly faster due to using ++>>>>>> the construct `$foo =~ $regexp` rather than `$foo =~ /$regexp/` ++>>>>>> (probably avoids a copy or something like that internally) -- ++>>>>>> this despite checking both `exists` and `defined` on the hash, which ++>>>>>> should be reundant AFAICS. ++>>>>>> ++>>>>>> My guess is that the best of both worlds would be to move ++>>>>>> the byhand memoization to glob2re and have it return a compiled ++>>>>>> `/^/i` regexp that can be used without further modifiction in most ++>>>>>> cases. --[[Joey]] ++ + -------------------------------------------------------------- + Benchmarks done with Devel::Profile on the same testbed IkiWiki setup. I'm just showing the start of the profile output, since that's what's relevant. + + +</pre> +</div> + +<!-- 9a7387a53be2b1e182003f3e86cb76d7f10c4b67 --> |