Sylvestre Ledru
eeb4cdab58
Merge pull request #3743 from niyaznigmatullin/basenc_gnu_tests
...
basenc: error code on wrong usage, usage test
2022-07-25 23:20:25 +02:00
Niyaz Nigmatullin
e5fc8bca8d
basenc: fix error code on on wrong arguments, fix usage printing test
2022-07-25 23:12:10 +03:00
Sylvestre Ledru
9f9fb1901f
Merge pull request #3745 from uutils/dependabot/cargo/redox_syscall-0.2.15
...
build(deps): bump redox_syscall from 0.2.13 to 0.2.15
2022-07-25 21:15:30 +02:00
Sylvestre Ledru
2fa4d6a2bb
Merge pull request #3740 from resistor/main
...
Implement wc fast paths that skip Unicode decoding.
2022-07-25 21:15:13 +02:00
dependabot[bot]
fa87200f5e
build(deps): bump redox_syscall from 0.2.13 to 0.2.15
...
Bumps redox_syscall from 0.2.13 to 0.2.15.
---
updated-dependencies:
- dependency-name: redox_syscall
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-07-25 06:38:03 +00:00
Owen Anderson
0e7f1c4c0d
Add missing testcases for wc
.
2022-07-24 21:56:07 -07:00
Sylvestre Ledru
41003f4478
Merge pull request #3742 from cakebaker/numfmt_float
...
numfmt: don't round floats if --from is "none"
2022-07-24 20:24:53 +02:00
Daniel Hofstetter
34b4853890
numfmt: don't round floats if --from is "none"
2022-07-24 16:25:52 +02:00
Sylvestre Ledru
62305e67d1
Merge pull request #3719 from andrewbaptist/main
...
split: Don't overwrite files
2022-07-23 22:54:57 +02:00
Owen Anderson
d5f59f23fa
Implement wc fast paths that skip Unicode decoding.
...
Byte, character, and line counting can all be done on the raw bytes
of the incoming stream without decoding the Unicode characters. This
fact was previously exploited in specific fast paths for counting
characters and counting lines. This change unifies those fast paths into
a single shared fast paths, using const generics to specialize the
function for each use case. This has the benefit of making sure that all
combinations of these Unicode-oblivious fast paths benefit from the same
optimization.
On my laptop, this speeds up `wc -clm odyssey1024.txt` from 840ms to
120ms. I experimented with using a filter loop for line counting, but
continuing to use the bytecount crate came out ahead by a significant
margin.
2022-07-23 10:45:26 -07:00
Sylvestre Ledru
ec9130a4d7
Merge pull request #3735 from resistor/main
...
Implement a fast path for character counting in wc.
2022-07-22 13:29:47 +02:00
Sylvestre Ledru
f82ada645e
Merge pull request #3731 from sylvestre/fs-doc
...
document some common fs functions
2022-07-22 13:29:15 +02:00
Niyaz Nigmatullin
5f3f1112d1
Basename arguments simple format ( #3736 )
...
* basename: support simple format
* tests/basename: add tests for simple format
* basename: follow clippy advice
2022-07-22 13:28:54 +02:00
Sylvestre Ledru
9a1b4b537a
Merge pull request #3739 from jeckersb/nice-unsafe-nit
...
nice: Move call to Errno::clear() outside of unsafe block
2022-07-22 13:27:28 +02:00
John Eckersberg
282b368b28
nice: Move call to Errno::clear() outside of unsafe block
...
Minor nitpick (of my own previous patch!), Errno::clear() is a safe
function, it should not be inside of the unsafe block.
2022-07-21 15:57:21 -04:00
Andrew Baptist
f2cfc15a70
split: Don't overwrite files
...
Check that a file exists by calling create_new and changing the
interface of instantiate_current_writer to return a Result rather
than calling unwrap.
2022-07-21 12:06:13 -04:00
Sylvestre Ledru
be0cc8ff67
Merge pull request #3738 from cakebaker/numfmt_enable_test
...
numfmt: enable ignored test
2022-07-21 14:52:04 +02:00
Daniel Hofstetter
29c4d08ee9
numfmt: enable ignored test
2022-07-21 13:20:42 +02:00
Owen Anderson
417ad0e384
Add rustdoc comment.
2022-07-20 23:32:50 -07:00
Owen Anderson
13762cae05
Implement a fast path for character counting in wc.
...
When wc is invoked with only the -m flag, we only need to count the
number of Unicode characters in the input. In order to do so, we don't
actually need to decode the input bytes into characters. Rather, we can
simply count the number of non-continuation bytes in the UTF-8 stream,
since every character will contain exactly one non-continuation byte.
On my laptop, this speeds up `wc -m odyssey1024.txt` from 745ms to
109ms.
2022-07-20 22:35:40 -07:00
Sylvestre Ledru
ba24565b60
Merge pull request #3732 from cakebaker/numfmt_auto_suf_si_i
...
numfmt: show "invalid suffix" error for "i" suffix
2022-07-20 22:51:14 +02:00
Sylvestre Ledru
c5f35aabc6
Merge pull request #3730 from niyaznigmatullin/ln_error_messages
...
ln: error messages
2022-07-20 17:52:51 +02:00
Sylvestre Ledru
ba44fd0e2b
document some common fs functions
2022-07-20 17:51:53 +02:00
Daniel Hofstetter
74bd9a26d6
numfmt: show "invalid suffix" error for "i" suffix
2022-07-20 17:51:36 +02:00
Sylvestre Ledru
b9d8ee6605
Merge pull request #3734 from uutils/dependabot/github_actions/vmactions/freebsd-vm-0.2.0
...
build(deps): bump vmactions/freebsd-vm from 0.1.9 to 0.2.0
2022-07-20 11:59:07 +02:00
dependabot[bot]
7948cb7924
build(deps): bump vmactions/freebsd-vm from 0.1.9 to 0.2.0
...
Bumps [vmactions/freebsd-vm](https://github.com/vmactions/freebsd-vm ) from 0.1.9 to 0.2.0.
- [Release notes](https://github.com/vmactions/freebsd-vm/releases )
- [Commits](https://github.com/vmactions/freebsd-vm/compare/v0.1.9...v0.2.0 )
---
updated-dependencies:
- dependency-name: vmactions/freebsd-vm
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-07-20 06:45:20 +00:00
Niyaz Nigmatullin
9f2a9fa6ff
uucore/fs: make function more generic
2022-07-19 17:34:52 +03:00
Niyaz Nigmatullin
b76c53c090
ln: fix windows non-compiling code
2022-07-19 17:34:52 +03:00
Niyaz Nigmatullin
f220c86121
util/build-gnu.sh: remove some test changes + change some messages
2022-07-19 17:34:52 +03:00
Niyaz Nigmatullin
406d3931e9
tests/ln: fix tests according to new messages
2022-07-19 17:34:52 +03:00
Niyaz Nigmatullin
80ff3b3b40
ln: change error messages, extract common code
2022-07-19 17:34:52 +03:00
Sylvestre Ledru
9402a7b3ba
Merge pull request #3728 from uutils/dependabot/github_actions/vmactions/freebsd-vm-0.1.8
...
build(deps): bump vmactions/freebsd-vm from 0.1.7 to 0.1.9
2022-07-19 16:07:01 +02:00
Sylvestre Ledru
5eafcc4801
Use macos-12 for freebsd hosts
2022-07-19 14:04:03 +02:00
Sylvestre Ledru
e16545723d
Merge pull request #3720 from andrewbaptist/fix_warnings
...
Update to handle all the latest cargo warnings
2022-07-19 11:40:38 +02:00
Andrew Baptist
cc08e1cc3a
Update to handle all the latest cargo warnings
2022-07-18 13:20:49 -04:00
Sylvestre Ledru
ce12dec5c9
freebsd-vm - update to 0.1.9
2022-07-18 16:17:20 +02:00
Owen Anderson
735db78b3d
wc: specialize scanning loop on settings. ( #3708 )
...
* wc: specialize scanning loop on settings.
The primary computational loop in wc (iterating over all the
characters and computing word lengths, etc) is configured by a
number of boolean options that control the text-scanning behavior.
If we monomorphize the code loop for each possible combination of
scanning configurations, the rustc is able to generate better code
for each instantiation, at the least by removing the conditional
checks on each iteration, and possibly by allowing things like
vectorization.
On my computer (aarch64/macos), I am seeing at least a 5% performance
improvement in release builds on all wc flag configurations
(other than those that were already specialized) against
odyssey1024.txt, with wc -l showing the greatest improvement at 15%.
* Reduce the size of the wc dispatch table by half.
By extracting the handling of hand-written fast-paths to the
same dispatch as the automatic specializations, we can avoid
needing to pass `show_bytes` as a const generic to
`word_count_from_reader_specialized`. Eliminating this parameter
halves the number of arms in the dispatch.
2022-07-18 12:16:52 +02:00
dependabot[bot]
04ddf559ec
build(deps): bump vmactions/freebsd-vm from 0.1.7 to 0.1.8
...
Bumps [vmactions/freebsd-vm](https://github.com/vmactions/freebsd-vm ) from 0.1.7 to 0.1.8.
- [Release notes](https://github.com/vmactions/freebsd-vm/releases )
- [Commits](https://github.com/vmactions/freebsd-vm/compare/v0.1.7...v0.1.8 )
---
updated-dependencies:
- dependency-name: vmactions/freebsd-vm
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-07-18 12:12:19 +02:00
Sylvestre Ledru
189a8af450
Merge pull request #3721 from niyaznigmatullin/add_test_for_issue_3332
...
tests/cp: add test for cp-parents.sh
2022-07-18 12:11:30 +02:00
Sylvestre Ledru
6248afed68
Merge pull request #3725 from uutils/dependabot/cargo/nix-0.24.2
...
build(deps): bump nix from 0.24.1 to 0.24.2
2022-07-18 12:11:07 +02:00
dependabot[bot]
d15b95533e
build(deps): bump nix from 0.24.1 to 0.24.2
...
Bumps [nix](https://github.com/nix-rust/nix ) from 0.24.1 to 0.24.2.
- [Release notes](https://github.com/nix-rust/nix/releases )
- [Changelog](https://github.com/nix-rust/nix/blob/v0.24.2/CHANGELOG.md )
- [Commits](https://github.com/nix-rust/nix/compare/v0.24.1...v0.24.2 )
---
updated-dependencies:
- dependency-name: nix
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-07-18 06:41:18 +00:00
Sylvestre Ledru
fbe22497ff
Merge pull request #3724 from niyaznigmatullin/ln_same_file_on_force
...
ln: symlink --force, src and dst are same file
2022-07-18 08:29:44 +02:00
Niyaz Nigmatullin
0ab0f2761f
tests/ln: add test for same file
2022-07-18 08:17:37 +03:00
Niyaz Nigmatullin
4db08273b3
ln: error on --force when src=dst and dst is regular file
2022-07-18 08:17:37 +03:00
Sylvestre Ledru
ef6182d209
Merge pull request #3723 from niyaznigmatullin/add_issue_3722_test
...
tests/rm: add test for issue #3722
2022-07-17 23:41:05 +02:00
Niyaz Nigmatullin
028c08cce2
tests/rm: add test for issue #3722
2022-07-17 23:34:04 +03:00
Niyaz Nigmatullin
147f83f68a
tests/cp: add test for cp-parents.sh
2022-07-17 23:04:09 +03:00
Niyaz Nigmatullin
0ea3a735ca
readlink: symlink loop handling ( #3717 )
...
readlink: fix symlink loop handling
2022-07-14 22:32:55 +02:00
Sylvestre Ledru
882cd527ff
Merge pull request #3704 from Sciencentistguy/once_cell
...
Replace lazy_static with once_cell
2022-07-13 16:15:47 +02:00
Sylvestre Ledru
8938b1f9e1
Merge pull request #3716 from cakebaker/numfmt_reject_suffix
...
numfmt: reject suffix if unit is "none"
2022-07-13 16:14:43 +02:00