Commit graph

9 commits

Author SHA1 Message Date
bep
bef92baa48 Add convenience script to run benchmarks 2015-05-14 23:17:45 +02:00
bep
f1fec88c30 Improve abs url replacement speed
This commit replaces the multuple `bytes.Containts` and `bytes.Replace` with a custom replacer that does one pass through the document and exploits the fact that there are two common prefixes we search for, `src=` and `href=`.

This is both faster and consumes less memory. There may be even better algos to use here, but we must leave some room for improvements for future versions.

This should also make it possible to solve #816.

```
benchmark              old ns/op     new ns/op     delta
BenchmarkAbsUrl        25795         22597         -12.40%
BenchmarkXmlAbsUrl     17187         11166         -35.03%

benchmark              old allocs     new allocs     delta
BenchmarkAbsUrl        60             33             -45.00%
BenchmarkXmlAbsUrl     30             16             -46.67%

benchmark              old bytes     new bytes     delta
BenchmarkAbsUrl        5844          4167          -28.70%
BenchmarkXmlAbsUrl     3754          2069          -44.89%
```

Fixes #894
2015-02-16 08:24:42 -05:00
bep
ee34a840bc Add test binaries to .gitignore 2015-01-20 16:49:28 +01:00
bep
4b1780bf69 Add test coverage files to .gitignore 2015-01-20 12:09:22 +01:00
Ask Bjørn Hansen
e53bc948a5 Ignore content files ending in ~
Also add *~ to .gitignore
2014-02-28 23:23:59 -05:00
Noah Campbell
0fabd51ab1 Update .gitignore to ignore *.swo files
For the fellow vim user.
2013-08-23 14:57:21 -07:00
Noah Campbell
66610a65d1 Removing OSX files from repo. Updating .gitignore to not track these files. 2013-08-02 10:00:25 -07:00
Noah Campbell
03e804ffd2 Updating the .gitignore for windows and vim users.
Adding hugo.exe for us windows fanbois.  Also adding gvim support.
2013-08-01 13:27:56 -07:00
tycho garen
8aff6cc373 gitignore: sanity 2013-07-06 19:37:40 -04:00