Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
alexkus
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
50 ms
·
391.
▲
by
alexkus
14y ago
Aha, thanks, missed that.
392.
▲
by
alexkus
14y ago
A 27" gear from direct drive is utterly impractical. Direct drive is only 8mph at 100rpm. You go at a nice cruising/commuting speed of 20mph you'd need to spin out 250rpm. I can only maintain 200rpm for short bursts! It needs something akin
393.
▲
by
alexkus
14y ago
The usual suspects are recursive qsort() implementations inside libc on Solaris, HP-UX and AIX. They've got a lot better in the latest releases but our software is supported on the older platforms (as far back as Solaris 7 for example) so i
394.
▲
by
alexkus
14y ago
This is my point, the worst case of stack usage of the basic quick sort algorithm is O(n), not O(log n); O(log n) is the average case. Consider a quicksort algorithm that takes the first element in each partition and uses that as the pivo
395.
▲
by
alexkus
14y ago
The more you "know" the less you have to go look for, and when you do have to go look for stuff on the Internet (since you're not omniscient) then you'll understand more of the pages you get back as results, and understand them faster since
396.
▲
by
alexkus
14y ago
Sent my answers in, reminds me how much I've actively avoided stats (I much prefer pure Maths).
397.
▲
by
alexkus
14y ago
You'll hit it every time given a typical x86 4KB page size and a step of 1024*sizeof(double)=8KB. I would guess that the example was explicitly contrived so that prefetching would be useless.
398.
▲
by
alexkus
14y ago
But then Backblaze's use of HDDs is not the same as an HDD stuck in a desktop machine and used as a primary/secondary drive. It's why their restore isn't instantaneous. You have to ask for the files and they'll let you know when they're rea
399.
▲
by
alexkus
14y ago
That's true, but doing so is a breach of the code of conduct you agreed to when signing up for the course. So, whilst you cannot be prevented from posting it somewhere public, you can (theoretically) be thrown off the course for doing so.
400.
▲
by
alexkus
14y ago
I think the OP is looking for a bit more of an answer than a simple Yes/No.
401.
▲
by
alexkus
14y ago
We use those kinds of approaches too. I never said the interview consists solely of closed book tests, they're just one thing I find useful to help gauge the suitability of an interviewee. [EDIT] The thing I'm most looking out for is how a
402.
▲
by
alexkus
14y ago
I use these kind of questions in interviews. You either know the answers or you don't. There's no looking at your 'phone in an interview (at least not one with me being the interviewer).
403.
▲
by
alexkus
14y ago
https://twitter.com/bengoldacre/status/249918250962530306 " @bengoldacre If you're frustrated by later publication in other countries, register your Kindle at 1 Road Street, London W1A 1AA http://amzn.to/Uhr0p4 "
404.
▲
by
alexkus
14y ago
"Flailover" The primary fails because of a bug and so it fails over to the backup which flails-over because of the exact same bug, c.f. https://en.wikipedia.org/wiki/Ariane_5_Flight_501
405.
▲
by
alexkus
14y ago
True, but not using // comments and mid-function variables is not quite the same thing as not using a whole feature. I just know how much work there is to do, at short notice, when a customer comes along offering $$$ for a version of your p
406.
▲
by
alexkus
14y ago
True, and it's a simple change to stop the comparison at either a NUL or a '&', so that it doesn't that extra unnecessary time. The other two improvements I'd be looking to do are: 1) try to rework the insertion sort to make it use a bi
407.
▲
by
alexkus
14y ago
Both implementations have exactly the same outcome for all inputs, it's just one has less code (well, code that is less complex) inside the loop and therefore is more pipeline friendly and/or just executes faster. Yes the string comparator
408.
▲
by
alexkus
14y ago
[EDIT - Fix unintentional italics] Another ~5% off by getting rid of the branch inside the str_compare() loop. Here was your original:- static inline int str_compare( const char *a, const char *b ) { for(;*a == *b; ++a, ++b)
409.
▲
by
alexkus
14y ago
Good work, one obvious speed up is, if possible, removing the use of dynamic memory. Simply supply a static output buffer to url_sort so that it doesn't have to allocate/free memory for the resulting URL. That took my execution for 5M lines
410.
▲
by
alexkus
14y ago
Surely the fastest encryption scheme would be none at all? It's times like this that it would be nice if ssh still supported the equivalent of "-c none" (or was it "-e none" in v1 ssh?). Of course, this is based on the assumption that the O
411.
▲
by
alexkus
14y ago
I found mysqld (5.5.24) running at 159% CPU on a Ubuntu 11.04 (64-bit) box this morning. ntpd had drifted in the leap second between 1am and 2am (GMT) this morning (NTP drift info is one thing I graph with MRTG). [EDIT] Ah, covered elsewher