Clojure JIRA
http://dev.clojure.org/jira/secure/IssueNavigator.jspa?reset=true&jqlQuery=project+%3D+MATCH+AND+created%3E%3D-1w+ORDER+BY+created+DESC
An XML representation of a search requesten-us4.464925-07-2011[MATCH-118] Simplify computation of necessary column
http://dev.clojure.org/jira/browse/MATCH-118
core.match<p>From match.clj:<br/>
;; IMPORTANT NOTE: this calculation is very very slow,<br/>
;; we should look at this more closely - David</p>
<p>This has to do with computing the necessary column, ie, the column that contains the most number of matches we will have to do. This patch simplifies this logic which is spread out over several functions and puts it into one location. Further, it improves complexity. When computing the necessity of a column, only patters above wildcards in a column need to be computed. the way the previous implementation worked was to compute the value for each entry in the pattern matrix and then check above each entry to see if there were wildcards. Now, we just group by column and then reduce on the column, adding up the same values as last time and immediately returning the accumulator with `(reduced acc)` if we hit a wildcard. This saves the repeated traversal of each column for each entry. A nice benefit is locality of everything inside of a single function.</p>
<p>I've timed this against master with the entries from `bench.clj` and was actually a little surprised to see that there was no time speedup, however.</p>Fedora, CIDER, clojure 1.8MATCH-118Simplify computation of necessary columnTaskMinorOpenUnresolvedDavid Nolendaniel suttonTue, 6 Dec 2016 20:56:14 -0600Tue, 6 Dec 2016 20:56:14 -060000Global RankWaiting Ondnolen