Live data from Hacker News

Make Ubuntu packages 90% faster by rebuilding them

gist.github.com

81–90 of 375 posts

Re: Make Ubuntu packages 90% faster by rebuilding them

#81

I think parsing once into a faster format (sqlite3 or parquet) would be more beneficial. https://simdjson.org/

For kicks, I downloaded the file and compared duckdb with the spatial extension against jq. jq was about 2x as fast for interactive use, but if you had multiple queries to run, paying a small cost to create a duckdb database and then querying it would be vastly faster

Re: Make Ubuntu packages 90% faster by rebuilding them

#82
post #59

Earlier quoted context omitted.

Are you arguing that ASLR is “security via obscurity”?

I would, and there is no shame in it, as far as I'm concerned. I don't need to outrun the bear. I just need to outrun you.

Except in this case there can be a whole bunch of parallel bears.

Re: Make Ubuntu packages 90% faster by rebuilding them

#83

Misleading title, it's 90% of the faster time. It's about 45% faster. It's actually a little bit interesting, if you are interested in how we use language. You could argue that now you now get 90% more work done in the same amount of time, and that would align with other 'speed' units that we commonly use (miles per hour, words per minute, bits per second). However, the convention in computer performance is to measur…

Related: https://randomascii.wordpress.com/2018/02/04/what-we-talk-ab...

Re: Make Ubuntu packages 90% faster by rebuilding them

#84
post #21

Earlier quoted context omitted.

https://github.com/01mf02/jaq?tab=readme-ov-file#performance jaq runs 5x faster on my machine in some cases

jaq is nice. It just loses, performance-wise, to the final step in this article, and it can't do the second mentioned workload (yet) so I didn't include it.

Which workload can't it do? I've had good success with jaq performance.

Re: Make Ubuntu packages 90% faster by rebuilding them

#85
post #78
post #38

Note that if you do this then you will opt out of any security updates not just for jq but also for its regular expression parsing dependency onigurama. For example, there was a security update for onigurama previously; if this sort of thing happens again, you'd be vulnerable, and jq is often used to parse untrusted JSON. > * SECURITY UPDATE: Fix multiple invalid pointer dereference, out-of-bounds write memory corrup…

A userland package manager like Gentoo Prefix could be used to install a custom build of this and still get security updates.

Indeed, there are many methods to have a custom build and still get security updates, including at least one method that is native to Ubuntu and doesn’t need any external tooling. However my warning refers to the method presented in the article, where this isn’t the case.

Re: Make Ubuntu packages 90% faster by rebuilding them

#86

Gentoo linux is essentially made specifically for people like this, to be able to optimize one’s own linux rig for one’s specific usecase. After initial setup, it’s pretty simple and easy to use, I remember making a ton of friends at matrix’s Gentoo Linux channel, was fun times. https://www.gentoo.org/ Fun fact, initial ChromeOS was basically just custom Gentoo Linux install, I’m not sure if they still use Gentoo Lin…

> Gentoo linux is essentially made specifically for people like this, to be able to optimize one’s own linux rig for one’s specific usecase.

That's true but worth noting that "optimize" here doesn't necessarily refer to performance.

I've been using Gentoo for 20 years and performance was never the reason. Gentoo is great if you know how you want things to work. Gentoo helps you get there.

Re: Make Ubuntu packages 90% faster by rebuilding them

#87
post #25

O3 is a bad idea if the package is important. While that’s a dated opinion based on older experiences (Gentoo, various server software, etc), I suspect it’s still the easiest way to get exposed to compiler bugs.

If you're going to offer unsupported FUD, I would prefer you direct the FUD at NDEBUG and the fear that it could have disabled a load-bearing assertion.

If acknowledging my opinion was dated based on older experiences constitutes “unsupported FUD”, well, have fun with the life experiences that attitude produces for you.

Re: Make Ubuntu packages 90% faster by rebuilding them

#88
post #38

Note that if you do this then you will opt out of any security updates not just for jq but also for its regular expression parsing dependency onigurama. For example, there was a security update for onigurama previously; if this sort of thing happens again, you'd be vulnerable, and jq is often used to parse untrusted JSON. > * SECURITY UPDATE: Fix multiple invalid pointer dereference, out-of-bounds write memory corrup…

What about PGO?

Re: Make Ubuntu packages 90% faster by rebuilding them

#89
post #51
post #38

Note that if you do this then you will opt out of any security updates not just for jq but also for its regular expression parsing dependency onigurama. For example, there was a security update for onigurama previously; if this sort of thing happens again, you'd be vulnerable, and jq is often used to parse untrusted JSON. > * SECURITY UPDATE: Fix multiple invalid pointer dereference, out-of-bounds write memory corrup…

This is certainly true. Also, by replacing the allocator and changing compiler flags, you're possibly immunizing yourself from attacks that rely on some specific memory layout.

By hardwiring the allocator you may end up with binaries that load two different allocators. It is too fun to debug a program that is using jemalloc free to release memory allocated by glibc. Unless you know what you are doing, it is better to leave it as is.
Post reply on HN