Commit Graph

10275 Commits (17f98a7f4d5a61c0d74689aba57652a8333fba39)
 

Author SHA1 Message Date
Wilfred Hughes 17f98a7f4d Next release will be 0.29.1 2022-06-13 16:49:55 +07:00
Wilfred Hughes ae42762a6d Fix mimalloc perf regression in 57a4b6d6ce
It looks like we were allocating large buffers for wu-diff, and
mimalloc performance is much worse for this case in the new version.

This reverts performance back to that 0.28 for large files,
such as the example in #297.
2022-06-13 02:02:01 +07:00
Wilfred Hughes 84dfcd8b5b Only consider the first 1,000 bytes in binary file detection
This is sufficient, and we were spending a lot of time in this
function in the sample files from #297.
2022-06-12 23:45:00 +07:00
Wilfred Hughes e369f5b53f Mention performance improvements 2022-06-09 10:19:20 +07:00
Wilfred Hughes dd80e58640 Roll version 2022-06-09 10:12:46 +07:00
Wilfred Hughes 426ce9751f Defer edge calculations
This saves 1.3% instructions and 7% peak memory usage (because the
predecessors hash map has smaller size values).
2022-05-29 11:32:44 +07:00
Wilfred Hughes 1f481496ff Factor out debug logging from shortest_path
This makes the core logic clearer
2022-05-29 10:01:42 +07:00
Wilfred Hughes 39be777a13 Prefer a complete sentence 2022-05-29 09:57:54 +07:00
Wilfred Hughes 96c550d0ab No longer using Rc for HashMap 2022-05-28 19:18:33 +07:00
Wilfred Hughes 4f8a8a8197 This function does not need to be pub 2022-05-28 10:09:54 +07:00
Wilfred Hughes f028b46003 cargo fmt 2022-05-25 09:35:28 +07:00
Wilfred Hughes 081b6fbe64 Move more into display/ 2022-05-25 09:33:53 +07:00
Wilfred Hughes d4285bed7c Move more files into diff/ 2022-05-25 09:31:12 +07:00
Wilfred Hughes c5fe152f25 Define a parse submodule 2022-05-25 09:28:12 +07:00
Wilfred Hughes 373d7d9d81 Define a diff submodule 2022-05-24 09:33:47 +07:00
Wilfred Hughes 8fe0fc13b5 Define a display submodule 2022-05-24 09:25:06 +07:00
Wilfred Hughes 43a03d2939 Tweak slogan to clarify that difftastic understands structure
"Understands syntax" is sometimes confused with syntax highlighting.
2022-05-23 23:39:15 +07:00
Wilfred Hughes 57a4b6d6ce Update dependencies 2022-05-23 22:36:37 +07:00
Wilfred Hughes df927eb713 Update pretty_assertions 2022-05-23 22:31:08 +07:00
Wilfred Hughes 1d4293864b Prefer a bump allocator for graph vertices
This reduces instruction counts by around 14%.
2022-05-23 09:38:13 +07:00
Wilfred Hughes 1fefc2740a Preallocate the predecessors hashmap to reduce rehashing/reallocations
This reduces instruction counts by 4-6% on the sample files.

Thanks to @Enter-tainer for suggesting this in #290.
2022-05-21 23:31:26 +07:00
Wilfred Hughes 1646d456f4 Arena allocate vertices
This reduces the instruction count by 4% on larger files, such as
slow_before/after.rs.

Co-authored-by: mgt <mgt@oi-wiki.org>
2022-05-21 22:24:19 +07:00
Wilfred Hughes f7aa78bd2b
Merge pull request #282 from Xuanwo/ci-improve
ci: Adopt rust-toolchain instead
2022-05-21 10:16:18 +07:00
Wilfred Hughes 6970b443b0 Document MIME database configuration and paths 2022-05-19 23:19:54 +07:00
Wilfred Hughes 64d65ad08a
Merge pull request #281 from Xuanwo/binary-content
feat: Improve binary content guess
2022-05-18 23:50:01 +07:00
Wilfred Hughes 0276886b52 Fix copy-paste confusing variable name 2022-05-14 11:58:24 +07:00
Wilfred Hughes 3da3d9eef4 More FxHashMap usage 2022-05-14 11:53:45 +07:00
Wilfred Hughes 6a0858af11 Prefer FxHashMap over HashMap in more places 2022-05-14 11:49:30 +07:00
Wilfred Hughes bfb2a5035c Pass DisplayOptions in more places 2022-05-13 19:48:26 +07:00
Wilfred Hughes 3eada5b9b0 Prefer outer delimiter in lisps 2022-05-11 11:54:02 +07:00
Wilfred Hughes ca1dbbc264 Update expected output file for 902c30f6c 2022-05-11 11:45:48 +07:00
Wilfred Hughes a454ef57ce Add more module docs 2022-05-11 11:32:03 +07:00
Wilfred Hughes 902c30f6cf Only print rename information when we're called from git
If the user explicitly runs `$ difft old.js new.js` there's no point
talking about renames.
2022-05-10 09:37:36 +07:00
Wilfred Hughes 8e48c303dc Clarify which manual pages are focused on internals 2022-05-09 20:27:33 +07:00
Wilfred Hughes 1ae5404dbd Treat languages supported as a top-level manual section 2022-05-08 13:12:03 +07:00
Seokchan Sean Ahn b9244aa348 Update getting_started.md 2022-05-08 13:07:24 +07:00
Seokchan Sean Ahn 7fa0a2e830 Add homebrew installation guide 2022-05-08 13:07:24 +07:00
Wilfred Hughes 1a6c5b8e7f Display rename information when before and after paths are different 2022-05-08 11:52:42 +07:00
Xuanwo 9e1c76bc65
Update rust-toolchain.toml
Co-authored-by: Wilfred Hughes <me@wilfred.me.uk>
2022-05-08 02:48:12 +07:00
Wilfred Hughes 2d8e1cf180
Merge pull request #279 from Xuanwo/fix_bad_padding
fix: Bad padding of column numbers at the end of files
2022-05-07 11:27:47 +07:00
Wilfred Hughes 5103389d23 Mention Elvish in changelog 2022-05-07 11:26:35 +07:00
Wilfred Hughes 5a09e9b3f7
Merge pull request #226 from cherryblossom000/elvish
Add Elvish support
2022-05-07 11:25:33 +07:00
Zachary Dremann 1fb8ba7ee4 Add fixes suggested by clippy 2022-05-07 11:18:14 +07:00
cherryblossom defc084637
Add Elvish support
Add support for [Elvish](https://elv.sh).
2022-05-07 20:12:43 +07:00
cherryblossom ffcb39e041 Add 'vendor/tree-sitter-elvish/' from commit 'e50787cadd3bc54f6d9c0704493a79078bb8a4e5'
git-subtree-dir: vendor/tree-sitter-elvish
git-subtree-mainline: a8d064eacf
git-subtree-split: e50787cadd
2022-05-07 20:10:28 +07:00
Wilfred Hughes a8d064eacf Include line number when debug printing lists 2022-05-05 20:38:29 +07:00
Wilfred Hughes 59cea9f00a cargo fmt 2022-05-05 00:04:44 +07:00
Wilfred Hughes dd8be0ca28 Use reference counted pointers to Vertex
Previously we'd store whole copies of the Vertex (the heap and the
predecessors hashmap). A vertex is 56 bytes, and a pointer is only 8
bytes.

This reduces instruction counts by 12% on slow_before.rs (3.4M to
3.0M) and other files I've tested also see a 12% improvement.
2022-05-04 19:40:08 +07:00
Xuanwo 3939359617
ci: Use stable rust for code coverage
Signed-off-by: Xuanwo <github@xuanwo.io>
2022-05-03 15:56:59 +07:00
Xuanwo 72533ab325
ci: Adopt rust-toolchain instead
Signed-off-by: Xuanwo <github@xuanwo.io>
2022-05-03 15:53:42 +07:00