Re:XSV: A fast CSV command-line toolkit written in Rust
by dbaupp on Saturday September 08, 2018 @08:40PM
(#17943646)
With a warm cache, ripgrep takes 80-100ms to search 500MB of files across all the projects that I have checked out (for a regex like /val\w+;/ which matches 500 lines). Python starts (also from a warm cache) in 30ms on my machine. 30-40% seems like a large percentage by most measures.
Re:XSV: A fast CSV command-line toolkit written in Rust
by leshow on Saturday September 08, 2018 @08:17PM
(#17943560)
In 150ms the other tool would be finished before any of those had even begun. Plus, this is for a print statement, you'd have to factor in dependencies as well to get a real idea of how long it took.
Re:XSV: A fast CSV command-line toolkit written in Rust
by hegz on Saturday September 08, 2018 @09:15PM
(#17943745)
That 150ms is especially important if the tool is running in a loop in a bash command.
Re:XSV: A fast CSV command-line toolkit written in Rust
by lifthrasiir on Saturday September 08, 2018 @08:16PM
(#17943556)
While it us technically possible to optimize dependency relations to minimize the startup cost for minimal tasks, it is very hard to do in reality. In the "oxidation" plan of the Mercurial SCM [1] this problem was directly addressed and one of the first suggested targets to switch to Rust was an alternative CLI frontend.
Re:XSV: A fast CSV command-line toolkit written in Rust
by pests on Saturday September 08, 2018 @08:07PM
(#17943533)
A single print statement? That is extremely artificial. I'd like to to see numbers wheb you're loading dependencies and on a real workload.
That's barely even making use of those languages runtimes as well.
Re:XSV: A fast CSV command-line toolkit written in Rust
by shawn on Saturday September 08, 2018 @08:08PM
(#17943540)
Why load dependencies when the task is text transformation? It’s not artificial.
Importing the regex libs won’t affect the results by more than a rounding error.
Re:XSV: A fast CSV command-line toolkit written in Rust
by londt8 on Saturday September 08, 2018 @08:30PM
(#17943619)
The comment was about loading a large VM at each invocation, so only minimal example is sufficient.
Re:XSV: A fast CSV command-line toolkit written in Rust
by pests on Saturday September 08, 2018 @09:30PM
(#17943799)
Sure, technically.
We were talking about start up time when using a CLI tool. Loading a VM is only part of that.
Re:XSV: A fast CSV command-line toolkit written in Rust
by arcticbull on Saturday September 08, 2018 @08:21PM
(#17943580)
That is a long time, though. An eternity in terms of compute.
This is a myth, FWIW. LuaJIT, python, and node all load within 150ms. And it's usually closer to 70ms: https://gist.github.com/shawwn/544b643bba018fb6bd302a5c46222...