Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
pinteresting
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
5 ms
·
1.
▲
by
pinteresting
5y ago
Can you think of a function where the input is valid, the output is NaN and nothing has gone wrong in the process? I can't think of any, haven't experienced any, not heard of any examples of it, so you're welcome to break my
2.
▲
by
pinteresting
5y ago
Generally if you're seeing a NaN/Inf something has gone wrong, It's very difficult to gracefully recover from and if you tried I think you would lose both sanity and performance! Regarding performance, the cost of a real divi
3.
▲
by
pinteresting
5y ago
If you know what a compiler will optimise, might optimise and can't optimise, you can get an intuition for what the generated code will be executing, but even ASM is not "full control" and often not super useful because what
4.
▲
by
pinteresting
5y ago
I guess that's true. Calling an expensive function effectively in the body of a loop like in this example is going to be an issue in every language. It is difficult to optimise because you need the compiler to evaluate and prove at com
5.
▲
by
pinteresting
5y ago
In my limited experience I find CSS examples always make things look simple, but then in reality I'm forced to do something stupid like this for a 400px canvas: left: 50%; margin-left: -205px; bord
6.
▲
by
pinteresting
6y ago
There is more to latency than just the ping to the server. The raw controller input latency / controller polling rate. The time it takes for your packet to get to the server. The number of packets per second you're sending to the
7.
▲
by
pinteresting
6y ago
That's not correct. In compiled languages, if for example denominator can be computed at compile time, it will almost certainly be optimized to use tricks, the easiest one is to just convert it to a multiply. A division instruction can
8.
▲
by
pinteresting
6y ago
If you could sandbox part of the screen to say this thing is standalone and cannot perform any networking abilities and is cut off from everything else on the page that would be great. The browser could recognise that tag and you get a safe
9.
▲
by
pinteresting
6y ago
Faster per watt I agree. Per clock, they could be somewhat similar with caveats. Per Core, the clock speeds that can be achieved with intel are much higher (even if it throttles). I think both are good enough for 90% of the population. I do