Hacker News .hnnew | past | comments | ask | show | jobs | submit | sbanach's commentslogin

Happens all the time. Here's another good one: https://www.nbim.no/ (the Norwegian Sovereign Wealth Fund)

Is a <1s live ticking number implausibly high frequency? Of course, it's just spooling out numbers on a timer.


I'm OK with those, it's likely a semi-accurate interpolation.


LDPE (thicker, 'bag for life' etc) is about 4 times as bad, paper bags 3 times, vs HDPE (thin) bags assuming no reuse. The below UK gov study investigates impact of each (and other alternatives like cloth bags) and also considers reuse as bin liners, which significantly changes the numbers.

https://assets.publishing.service.gov.uk/government/uploads/...


With Java vs C++, the experience seems similar. In C++, memory allocation is slow, so you worry about memory allocation up front. In Java, GC is a pain so you worry about memory allocation up front. As Daniel points out, there are a few extra tricks available to native developers (eg vector instructions), so there's a small factor speed-up in best-practice C++ vs best-practice Java, but this is closing (eg the JIT increasingly uses vector instructions). Overwhelmingly the difference between a slow system and a fast system is appropriate choices of algorithms and architecture, not the language.


>In C++, memory allocation is slow, so you worry about memory allocation up front. In Java, GC is a pain so you worry about memory allocation up front...

This.

A lot of people seem to be willfully dismissive of this reality when they are fanboying for their favorite languages.

Ask for memory in C++, you'll take a HUGE hit getting it. Ask for memory in Java, and you'll get it lightning fast, but you'll take a huge hit getting rid of it. Either way, you should carefully plan memory usage up front.

Basically, one road leads to death and despair, the other leads to disease and destruction...

pray you choose wisely.


Any moderately performance sensitive code in C++, assuming it needs allocations at all will use a dedicated allocator.

While it is hard to beat existing general purpose allocators in all the scenarios, it is easy for specific use cases.


True but these approaches in both C++ and Java start to converge: Arena allocation vs Pooling/unsafe. The question is, how annoying is your performance insensitive code?


The compression format is really smart, there's a neat trick to make the logarithm calculation fast, and there's a concurrent thread handoff mechanism so you can swap out a histogram without disturbing the thread you're measuring (though last two probably only in the java version). Those three make it super useful for very low impact performance measurements.


Google claims 3.5 billion queries per day, so approaching 1% of that.


How can DDG make a living at 350 queries per second?


260 qps to be exact. That is not negligible.


Well, it's pretty small. I'm just multiplying though here the CTR and the CPC and the QPS. I guess they can probably serve DDG from a handful of machines, since they don't own the search stack.


Yeah, but they pay for the web results


Congratulations!


Much appreciated! I've began training my replacement.


High frequency trading?


That's pretty interesting. Is there a concrete example of a quorum definition where the probability of an outlier is improved vs majority quorum? I'm struggling to come up with one. I've always assumed majority is optimal, since you can tolerate outliers in (n-1) / 2 voters without seeing an outlier for the commit overall. Eg: for 3 node Raft - you'd need both followers to have an outlier before a client notices a slow commit.


EM Forster took your thought experiment to it's logical conclusion for you: https://en.wikipedia.org/wiki/The_Machine_Stops


That's probably where I got the idea originally, tbh. I adore that story.


On hotspot: There are two bits in the header of every object. This is enough for an object that's never been used as a contended lock, CAS operations on the header can be used to handle the locking and that's that. As soon as you actually block on it, a 'real' lock is created (you can't get around the need for a list of threads to wake up as the lock is released) and the header grows to accomodate it. The process is called 'monitor inflation'. At a later date this might be cleaned up by a 'monitor deflation'.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: