12 Commits

Author SHA1 Message Date
Martin Angers
5dccaa115b optimize winnowNodes and ClosestNodes in the same way 2016-08-28 11:55:36 -04:00
Martin Angers
7bd630023a reuse the deduplication set map in mapNodes 2016-08-27 22:25:02 -04:00
Martin Angers
c7533ba696 maintain a set of existing target nodes to deduplicate
The old implementation used nested loops to check if one of the
new nodes was already in the existing nodes. This commit
maintains a map[*html.Node]bool so that a single loop over
the new elements is required. This is slower for small
slices though, and allocates more. The next step is for
appendWithoutDuplicates to accept a map as argument so
that the set is not recreated on each call from mapNodes.
2016-08-27 18:55:21 -04:00
Martin Angers
6bab89f9f6 test go1.0 compat 2014-04-11 12:25:45 -04:00
Martin Angers
e273eed13e add benchmark file for go1.2 2013-12-02 19:52:21 -05:00
Martin Angers
aa0519aedd bench with go1.2rc1, getting 10-15% gains 2013-09-24 12:31:03 -04:00
Martin Angers
8a4ef5dbdd add v0.3.0 tag and benchmark EachWithBreak 2013-05-24 11:40:46 -04:00
Martin Angers
948b88c36f add EachWithBreak(), fixes #13 2013-05-24 11:25:42 -04:00
Martin Angers
0d8bcaa448 add benchmark with go1.1rc1 2013-05-05 11:57:50 -04:00
Martin Angers
6948b1bfac finalize tests and benchmarks for v0.2 2012-11-11 21:26:27 -05:00
Martin Angers
1f8447feb6 add benchmark results for v0.1.1 2012-09-17 11:10:28 -04:00
Martin Angers
d239ff0ac3 finalize benchmarks for traversal.go, add bench data for v0.1.0 2012-09-12 14:50:41 -04:00