Skip to content

wc: wc -c does not optimize stdin as input by metadata #11610

@oech3

Description

@oech3

We have splice for pipe at input:

$ truncate -s 32GB huge
$ time cat huge| gnu58d88d243/wc -c
32000000000

real	0m2.012s
user	0m0.128s
sys	0m3.873s
$ time cat huge| wc -c
32000000000

real	0m0.388s
user	0m0.042s
sys	0m0.650s

that's fine. But uutils does not optimize stdin by metadata:

$ time wc -c <huge
32000000000

real	0m1.662s
user	0m0.040s
sys	0m1.612s
$ time gnu58d88d243/wc -c < huge
32000000000

real	0m0.004s
user	0m0.002s
sys	0m0.002s

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions