Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
uxcn
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
9 ms
·
31.
▲
by
uxcn
11y ago
x87 is largely deprecated. Try inspecting the code emitted for floating point by all the major compilers.
32.
▲
by
uxcn
11y ago
My mental model of a CPU unfortunately tends toward x86. > But of course, it might be possible to get that sqrt for free, too. Even if it takes 50 cycles, you might start one, do a few iterations without checking for ‘reached sqrt(n) yet
33.
▲
by
uxcn
11y ago
I honestly haven't looked into it in that much detail, but if I had to guess... probably. I'm not sure what the implementation used in hardware currently is, but at very least it's constant bounded, Conversions are still som
34.
▲
by
uxcn
11y ago
The latency for sqrtss on broadwell is 11 cycles with a throughput of 4, where mul is a latency of 3 and throughput of 1. So, using some concrete numbers, sqrt is more expensive, but not polynomially or even an order of magnitude.
35.
▲
by
uxcn
11y ago
You would normally use something like newton-raphson to compute a square root, which still isn't O(1) but converges fairly quickly. I would be very skeptical that n muls / adds would be faster than an sqrt , at very least for
36.
▲
by
uxcn
11y ago
> it would take quite a compiler to prevent the creation of an intermediate string. You could have every function return an iterator over the characters that would end up in the string, iterate over that to check whether the string alrea
37.
▲
by
uxcn
11y ago
> Interning is a trade-off: you get decreased memory usage (if you use a lot of long-lived duplicated strings) and faster string comparisons (for pairs of strings that you do intern), at the cost of extra work to create the interned stri
38.
▲
by
uxcn
11y ago
It's not easy to get people to use something new. It's even harder to get a majority of people to use something new. If you consider that Microsoft has nearly the same magnitude resources, and their own widely deployed platform
39.
▲
by
uxcn
11y ago
Firefox has lost a lot of market share to Chrome (something like 30% vs. 14%). Internet Explorer has too. Considering Google only launched a browser in '08, it's pretty impressive they're at something like 50%. Mozilla is s
40.
▲
by
uxcn
11y ago
Instead of exceptions, I personally prefer using assertions to verify things like preconditions; in which case if an assertion fails the software should generally crash before getting into a worse state. Arguably, if the software shouldn&#
41.
▲
by
uxcn
11y ago
> Even if the DB server selectively read columns of each row (none of the common open source SQL databases do), they do so via the OS, which works in terms of pages. Reading a single byte of a page will cause a minimum of 4kb of IO to be
42.
▲
by
uxcn
11y ago
It's a throughput problem, not an activity problem. Normally, since the rows are a fixed size the dbms will lay them out sequentially on disk. So, when the database reads from disk unless you read every column in the row, the dbms ha
43.
▲
by
uxcn
11y ago
> If you have a single table that's 100GB in size, you can parse through every single row in just under a minute! You're forgetting seek latency. It's orders of magnitude better with SSD, but it's still not necessari
44.
▲
by
uxcn
11y ago
Exception specifications (deprecated) aren't the same as checked exceptions, which I think was what some people might have in mind. In theory, they look like they solve a number of problems, but in practice they really create more tha
45.
▲
by
uxcn
11y ago
FItts' Law partly explains why I prefer keyboard oriented interfaces.
46.
▲
by
uxcn
11y ago
> Any kind of repeating lists (enum + a switch over all the values, for example) are best handled by define-include-undefine sequences. > See how it is done in LLVM, see all the .def files there. I cannot think of a single viable alte
47.
▲
by
uxcn
11y ago
You don't have to use the preprocessor, but it is definitely practical for certain things. It's probably not clear from my comment, but macros were what I assumed the above post was talking about though (e.g. min / max
48.
▲
by
uxcn
11y ago
Also things like generating code at compile time, but a lot of people could argue it both ways.
49.
▲
by
uxcn
11y ago
In C++, probably never. In C, they can be necessary for doing type orthogonal things (like intrusive data structures). Type generic expressions in C11 can be a bit of a safer alternative for some stuff, but you generally need to give expl
50.
▲
by
uxcn
11y ago
I think I'd agree, performance probably isn't the most compelling argument for unikernels, but it seems to be the one that's getting the most attention. Even from the performance perspective, eliminating context switches doe
51.
▲
by
uxcn
11y ago
Not all system calls imply a context switch either. Linux has had a vDSO mechanism for some time.
52.
▲
by
uxcn
11y ago
Text web browsers also make a lot of stuff like this reasonably easy inside a terminal. Someone mentioned http://elinks.or.cz/ a while ago.
53.
▲
by
uxcn
11y ago
Both Cosmoses (Carl Sagan's and Neil deGrasse Tyson's) also give a decent high level overview. The latter is still on Netflix I think.
54.
▲
by
uxcn
11y ago
> This is an issue for network people and developers. So, the problems mentioned in the post essentially were... * ambiguity specifying ports * software not recognizing addresses * length to type (3-32+7 characters) Lo
55.
▲
by
uxcn
11y ago
The majority of people will use IPv6 transparently through DNS. I'm not sure why typing an address into a browser or even a terminal seems like the more common use case.
56.
▲
by
uxcn
11y ago
The FAST (FIX Adapted for STreaming) protocol also uses a stop bit encoding. My guess was the data dependencies added to the pipeline would wash out the message size saved on average.
57.
▲
by
uxcn
11y ago
Cityhash successor port to C.
58.
▲
Show HN: Farmhash (C99)
(github.com)
2 points
by
uxcn
11y ago
|
1 comments
59.
▲
by
uxcn
11y ago
Nice, it even has a Javascript interpreter. I use w3m for various things, but the lack of Javascript makes it less than usable for a ton of stuff. The lack of configurable key-bindings also makes me sad.
60.
▲
by
uxcn
11y ago
The textareas are close, but it's not the same as having the actual editor. I use UltiSnips a lot, which without the actual editor you can't use. It's the same with a lot of Tim Pope's plugins (abolish, surround, etc
More ›