Live data from Hacker News

Miller – tool for querying, shaping, reformatting data in CSV, TSV, and JSON

miller.readthedocs.io

21–30 of 34 posts

Re: Miller – tool for querying, shaping, reformatting data in CSV, TSV, and JSON

#21

This was a great tool written in c, for handling large data files fast, unfortunately the new golang rewrite (version 6.0) is much slower (around 10x in a quick test I did).

The version in the Ubuntu repos is 5.10. I wonder if they'll "upgrade" to 6.0. Downthread people are complaining about the compilation time for the C version, which seems like a much less significant issue when the cost of compilation is amortized over many users. But if Go is a much more productive language, I guess a feature delta will accumulate...

Distros are still at 5.10 pending a few final issues to be resolved -- then 6.0 can be generally released. Hopefully in a month or so.

The most important release blocker (now resolved) is https://github.com/johnkerl/miller/pull/786 et al., thanks to which Miller 6 performance is now on par with Miller 5 for simple processing, and far better than Miller 5 for complex processing chains.

Re: Miller – tool for querying, shaping, reformatting data in CSV, TSV, and JSON

#22
post #19

This was a great tool written in c, for handling large data files fast, unfortunately the new golang rewrite (version 6.0) is much slower (around 10x in a quick test I did).

I hope that this is temporary to make working on the project easier, Go can get pretty close to C in terms of speed and it's usually easier to jump into a Go project. But 10 times slower seems way too much.

Indeed -- that was before final optimization work on https://github.com/johnkerl/miller/pull/786 et al., thanks to which Miller 6 performance is now on par with Miller 5 for simple processing, and far better than Miller 5 for complex processing chains. See that PR for tabulated processing-time results.

Re: Miller – tool for querying, shaping, reformatting data in CSV, TSV, and JSON

#23
post #7

Earlier quoted context omitted.

That's a fascinating perspective... This mentality is why modern software seems slower... Because it is. So many technological advances, computers are exponentially faster in so many ways, yet we regress in performance. It's a shame, really...

It's basically Parkinson's law. If you give someone 10x the performance, they'll find a way of doing the same things they did before using 10x more resources. It's why you have user interfaces today that are often as slow as, or slower than the equivalent Windows 3.11 interfaces. In 1993 things took time because the processor was an actual potato and the data fetched off a floppy disk, today things are slow because t…

The 10x number was before improvements on https://github.com/johnkerl/miller/pull/786 et al. The earlier negative perf results were my fault, not Go's -- I was focusing initially on the port and feature development, leaving benchmarking and optimization until the end. That said, Go is a bit slower than C line for line; however, Miller 5 (in C) was single-threaded and Miller 6 (in Go) actively uses multicore. This is why complex processing chains now run much quicker in Go than in C -- due to multicore and pipelining which are much easier to do in Go.

Re: Miller – tool for querying, shaping, reformatting data in CSV, TSV, and JSON

#24

This was a great tool written in c, for handling large data files fast, unfortunately the new golang rewrite (version 6.0) is much slower (around 10x in a quick test I did).

Thanks -- my apologies for the sequencing of the dev work. I focused first on the port per se; second on feature-adds; leaving benchmarking, performance analysis, and optimizations (even some real low-hanging fruit) until last. The 10x number was indeed the case pre-optimization ... on https://github.com/johnkerl/miller/pull/786 you can see tabulated results where Miller 6 is now on par with Miller 5, and in some cases is far faster.

Re: Miller – tool for querying, shaping, reformatting data in CSV, TSV, and JSON

#25
post #19

Earlier quoted context omitted.

I hope that this is temporary to make working on the project easier, Go can get pretty close to C in terms of speed and it's usually easier to jump into a Go project. But 10 times slower seems way too much.

Indeed -- that was before final optimization work on https://github.com/johnkerl/miller/pull/786 et al., thanks to which Miller 6 performance is now on par with Miller 5 for simple processing, and far better than Miller 5 for complex processing chains. See that PR for tabulated processing-time results.

That's impressive, congratulations!

Re: Miller – tool for querying, shaping, reformatting data in CSV, TSV, and JSON

#26
post #5

Earlier quoted context omitted.

Fine by me. The C version was a pain in the ass to compile. The Go version compiles in less than one minute, with a simple `go build`, on Windows, Linux or any Go platform. I will take that over the faster speed every time.

You'd rather optimize for compile time, which you do (maybe) 1x, over runtime, which you easily do >100x? You're focusing on the developer, not the user, but this is a user tool :(

Agreed, very much a user tool -- once it's released most people will get it via brew/yum/apt/conda/chocolatey and compile time will not be relevant for most folks.

Miller has always been a user tool and will remain so.

I think the confusion arose because I did the port per se and feature-adds first (which has taken most of the time), and left analysis/optimization (even low-hanging fruit like output-buffering) until the very end -- https://github.com/johnkerl/miller/pull/786 for example merged just a couple days ago.

Re: Miller – tool for querying, shaping, reformatting data in CSV, TSV, and JSON

#27
post #5

This was a great tool written in c, for handling large data files fast, unfortunately the new golang rewrite (version 6.0) is much slower (around 10x in a quick test I did).

Fine by me. The C version was a pain in the ass to compile. The Go version compiles in less than one minute, with a simple `go build`, on Windows, Linux or any Go platform. I will take that over the faster speed every time.

Agreed; I've never really liked C compiles, and the Go build process is dreamy.

Another win (besides more features, and recent performance improvements) -- the Windows version is now a snap. Now `mlr.exe` takes it rightful place alongside the Linux and Mac executables (https://github.com/johnkerl/miller/releases/tag/v6.0.0-beta). Go+Windows is heavenly & I'll never need to tweak MSYS2/Appveyor/DLLs/etc again. :) See also https://miller.readthedocs.io/en/latest/miller-on-windows/

Re: Miller – tool for querying, shaping, reformatting data in CSV, TSV, and JSON

#29
post #16

Earlier quoted context omitted.

Lots of them out there. Here's one that repurposes the extends the standard unix tools to know about comments and column labels: https://github.com/dkogan/vnlog/

If have any more links, please post them! I am a fan of collecting such tools.

I just published dsq [0] for running SQL queries against CSV/JSON/Excel/Parquet/etc or just converting those files to JSON.

[0] https://github.com/multiprocessio/datastation/tree/main/runn...

Re: Miller – tool for querying, shaping, reformatting data in CSV, TSV, and JSON

#30

Earlier quoted context omitted.

The version in the Ubuntu repos is 5.10. I wonder if they'll "upgrade" to 6.0. Downthread people are complaining about the compilation time for the C version, which seems like a much less significant issue when the cost of compilation is amortized over many users. But if Go is a much more productive language, I guess a feature delta will accumulate...

Distros are still at 5.10 pending a few final issues to be resolved -- then 6.0 can be generally released. Hopefully in a month or so. The most important release blocker (now resolved) is https://github.com/johnkerl/miller/pull/786 et al., thanks to which Miller 6 performance is now on par with Miller 5 for simple processing, and far better than Miller 5 for complex processing chains.

Awesome! Hopefully the distros will keep up.

I saw in some other comments you mentioned some performance lift coming from thread level parallelism in Go. I wonder -- can you get oversubscription issues if the user is doing their own parallelism (I assume some folks will implement 'parallelism' by throwing a bunch of independent processes at a bunch of independent records).

I know in openMP (for example) this would be something where the user is expected to keep track of it, but maybe the Go runtime handles this stuff gracefully?

Post reply on HN