HackerTrans
TopNewTrendsCommentsPastAskShowJobs

Sesse__

2,530 karmajoined 6 years ago
https://www.sesse.net/

comments

Sesse__
·9 hours ago·discuss
I don't have a book, but my best recommendation would be: Learn how to measure. Whatever language you are using should have a profiler. Learn how to use it and look at how your code holds up. Look for surprises; those are optimization opportunities and learning opportunities. Make a change that you think has a reasonable shot at optimizing performance, look at how the profile and benchmarks change. If you're using a compiled language, look at what the generated code looks like. Is it what you'd expect, or did the compiler do something that blindsided you? Can you get rid of that overhead? Can you use a faster algorithm? Can you make things faster without making it an unmaintainable mess?

In general, you must expect to try ten things and then one of them will help you; fewer if your ideas are bad. :-) Occasionally, you learn new things (either about your machine or your language or your code base) and then you can try that elsewhere in the code (but don't go overboard, every technique has its limits).

DO NOT FALL PREY TO SUPERSTITION. Always measure in one way or the other. Don't do stuff blindly just because someone on the Internet told you (there's a _lot_ of bad performance advice out there).
Sesse__
·10 hours ago·discuss
This is called “installing a cryptominer on your web page” and is generally considered illegitimate.
Sesse__
·11 hours ago·discuss
That's a completely different question, your claim was about parallelism.
Sesse__
·13 hours ago·discuss
Uh, is it resistant to parallelization across multiple sites? Because that's the situation for the scrapers. They're not trying to solve a single PoW challenge across many cores.
Sesse__
·6 days ago·discuss
The sad part is that most employers don't care particularly about performance optimization skills (the economics don't work out, they can often just fix the problem cheaper with more hardware—and even if they can't, they mostly don't bear the cost themselves).

The fun part is that when your employer _does_ care about software optimization, few people are actually good at it and your skills are more exclusive :-)
Sesse__
·9 days ago·discuss
I once measured a 80s-communally-built event space with a laser meter (it was useful to have digital floor maps for event planning). No measurement was a perfectly round number. No angle was perfectly right. Nothing really lined up. Except… there was this one set of stairs leading up to the stage. It was perfect. Every step was exactly the same in all dimensions, to the millimeter. It was perfectly level. I always wondered who this stair craftsman was, who prided themselves on doing such professional work among the presumed chaos. :-)
Sesse__
·10 days ago·discuss
> Also to your point, this is why compliant peak meters use a mandatory 4x upsampling at 48k.

This isn't due to latency, it's because the true peak (in the analog waveform) could be between samples.
Sesse__
·14 days ago·discuss
It's behind a flag, if you want to play with it. (The easiest way is usually just to test in Canary.)
Sesse__
·17 days ago·discuss
Did you actually test? I did it and it worked fine (and zooming in confirmed that the RGB bars are nicely preserved). Be sure to put your subsampling at 4:4:4.
Sesse__
·19 days ago·discuss
Why do you think it wouldn't work for a JPEG? I just made one like that, and it worked just fine.
Sesse__
·21 days ago·discuss
Just remove the A record, and nearly all the scrapers disappear. :-) (And then you get one email per month or so that “your host does not resolve in DNS”.)
Sesse__
·22 days ago·discuss
Are you maybe confusing “downstream” with “mainstream”? Being “downstream” of a product means that you are a derivative of that product (your upstream), taking in basically all of their code and adding your own on top.
Sesse__
·23 days ago·discuss
> And while they've recently announced more of this stuff will move to FOSS soon, at the same time their response rate to new bug reports has become worse than ever before, which is deeply worrying.

A huge chunk[1] of the MySQL developers were laid off (and also large amounts of QA etc.), so it's not surpising at all that they are struggling to keep the lights on. There are talks about an external group trying to form to take more ownership, but so far, your best bets are MariaDB or Postgres, depending on whether you think MySQL 5.1 was the epitome of relational databases or not.

[1] From what I gather, about 75%. In the first wave.
Sesse__
·23 days ago·discuss
MySQL has never been downstream of MariaDB.
Sesse__
·23 days ago·discuss
They are using a fork, although nobody _really_ knows how up-to-date it is.
Sesse__
·23 days ago·discuss
It's the one that nags you to upload all your IMAP passwords and email to Microsoft's cloud.
Sesse__
·25 days ago·discuss
FFmpeg has its own native H.264, HEVC, MP3, Speex and AAC decoders. It's true that they don't have an H.264 or HEVC _encoder_ without calling out to external libraries, but they have a pretty good AAC encoder now, and TBH most use of FFmpeg is for decoding, not encoding.
Sesse__
·25 days ago·discuss
> due to FFmpeg back then lacking any framework for code sharing between components and codecs

Funny, I remember this being completely different; FFmpeg bundled ffserver, which transcoded to a bunch of codecs at the same time (sharing motion search and everything) precisely to demonstrate how similar the codecs were and how much could be shared. (Of course, that could easily be spaghetti, but not spaghetti for non-code-sharing reasons.) All on the 400MHz-class machines we had at the time. Do I remember wrong? I haven't looked at these old releases in forever.
Sesse__
·26 days ago·discuss
The idea of having two arguments to fread() is presumably to be able to do something else than all-or-nothing when there's a short read.
Sesse__
·29 days ago·discuss
> ffmpeg and other media frameworks (Windows Media Foundation, Apple’s AVFramwork) only support static pipelines.

FFmpeg doesn't do “pipelines”. It's a library, not a framework.