Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
pcwalton
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
76 ms
·
961.
▲
by
pcwalton
5y ago
Pathfinder uses horizontal SIMD everywhere (e.g. vec4 stores x/y/z/w in a single SSE register). I measured about a 10% improvement across the board when enabling SSE+SSE2+SSSE3+SSE4.2+AVX vs. using scalar instructions only. T
962.
▲
by
pcwalton
5y ago
Memory safety also adds reliability, by catching bugs statically that you didn't catch during (automated or manual) testing. It's the same argument as for static typing. It's of course true that some developers may judge th
963.
▲
by
pcwalton
5y ago
All of these are available and widely used in C++ (for example [1]). They are not enough. [1]: https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html#...
964.
▲
by
pcwalton
5y ago
Adding bounds checks and ASan is not an order of magnitude improvement over C. Chrome, for example, is doing all of this already in C++ in a more advanced way than anything I've seen in Zig. Clang offers UBSan [1], which is extremely a
965.
▲
by
pcwalton
5y ago
Memory safety is a pain point of C, and Zig doesn't fix that. There is no free lunch: you either accept garbage collection or deal with something that resembles the borrow checker.
966.
▲
by
pcwalton
5y ago
> But the approach with best performance in practice is to just do a dumb increment through the table in-order because of caching... the penalty for that simple approach can be made up for with a good, pseudo-random hash. SwissTable, whi
967.
▲
by
pcwalton
5y ago
I really would like to see an attempt to defend Tether (and by extension most of the cryptocurrency ecosystem in practice) that doesn't require me to buy into ultra-libertarian ideology. Most people, including me, do not in fact beli
968.
▲
by
pcwalton
5y ago
Well, Hooke's law describes force, which isn't really a meaningful concept without inertia. I suspect that the game isn't really using springs at all, and instead it's an ease-out animation. I haven't checked the so
969.
▲
by
pcwalton
5y ago
Presumably it can't just be a spring obeying Hooke's law F=kx, or else the camera would "bounce" back and forth, right?
970.
▲
by
pcwalton
5y ago
Just so I understand you, is your position that Sundar Pichai or Tim Cook or whoever is approaching Mozilla employees in dark alleys, Willy Wonka and the Chocolate Factory Slugworth style, and offering cash to covertly sabotage the product?
971.
▲
by
pcwalton
5y ago
It shouldn't if you submit the paths from back to front and enable blending. You can then use analytic AA (distance-based or whatever you'd like) to blend with paths behind the one you're currently drawing.
972.
▲
by
pcwalton
5y ago
You could try using the Z buffer instead of the stencil buffer. Give each object a different Z coordinate and use GL_LESS/GL_GREATER depth tests to avoid overdrawing.
973.
▲
by
pcwalton
5y ago
It requires EXT_blend_minmax or WebGL 2, but yes.
974.
▲
by
pcwalton
5y ago
Fragment shader invocations are minimum 2x2 pixel blocks. Portions of those 2x2 pixel blocks outside the primitive represent wasted computation. Sliver triangles, with their long edges and small sizes, tend to increase the number of wasted
975.
▲
by
pcwalton
5y ago
> And yes, we still hate all the jokers coming in from California who are gladly dropping millions of bucks to buy up houses that just a few years ago were only worth a few hundred thousand. > Thanks for visiting, but Austin is full.
976.
▲
by
pcwalton
5y ago
In most cases, it's probably faster, not to mention simpler, to draw round caps/joins as square caps/miters and mask out the round part in the fragment shader (mess with alpha, or use discard if you don't care about earl
977.
▲
by
pcwalton
5y ago
Times like this I wish I were allowed to say exactly how much money a 1% fleet-wide loss in performance costs a big tech company.
978.
▲
by
pcwalton
5y ago
I'd say Zig is a more strictly low-level language than Rust, with less safety (it's not memory-safe) and a less sophisticated type system, but with more emphasis on being low-level (malloc is fallible) and with more metaprogrammin
979.
▲
by
pcwalton
5y ago
The optimization I'm referring to is widening a 32-bit loop IV to 64-bit so it can stay in a register: https://gist.github.com/rygorous/e0f055bfb74e3d5f0af20690759... size_t obviates the need for this optimization
980.
▲
by
pcwalton
5y ago
I'm also skeptical about the often-claimed superiority of ICC. The numbers I've seen are very equivocal. Besides, it's irrelevant: there are lots of free C compilers that don't exploit UB, and also rarely get used.
981.
▲
by
pcwalton
5y ago
Even assuming the 5% number were correct (depending on how expansive your definition of UB is, it may not be), asking everyone who doesn't adjust their compiler flags to accept a 5% slowdown for some theoretical benefits is at odds wit
982.
▲
by
pcwalton
5y ago
> These optimizations leave for C++ folks. C doesn't need all of that Yes, it does. In fact C needs it more, because of the "for (int i = 0; i < n; i++)" idiom. At least idiomatic C++ code uses iterators.
983.
▲
by
pcwalton
5y ago
In general I've long been very skeptical of removing optimizations that rely on undefined behavior. People say "I'd happily sacrifice 1% for better theoretical semantics", but theoretical semantics don't pay the bil
984.
▲
by
pcwalton
5y ago
> I suspect that this data is being deliberately withheld because it would suggest that frontline workers don't need vaccines, or at the very least don't need a mandate. Of all the possible reasons you couldn't find this
985.
▲
by
pcwalton
5y ago
I'm highly skeptical that static analysis of maximum stack depth will work, because of higher-order functions.
986.
▲
by
pcwalton
5y ago
You might consider that when you start bashing the Firefox developers personally, they are much more likely to just stop working on Firefox entirely than to listen to you. Realize that most engineers working at Mozilla are already giving up
987.
▲
by
pcwalton
5y ago
You seem awfully angry about programming languages!
988.
▲
by
pcwalton
5y ago
There was no "design committee" for Rust. I'm increasingly skeptical that any language with lifetimes can be anything other than "ugly to read". People complain about syntax, but what they're really complaining
989.
▲
by
pcwalton
5y ago
To save millions of lives worldwide? It isn't exactly hard math.
990.
▲
by
pcwalton
5y ago
If solving obesity were as effortless as getting two free widely-available shots? Absolutely, we would want to mandate them.
More ›