Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
wmu
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
18 ms
·
151.
▲
by
wmu
10y ago
Really good introduction, well written.
152.
▲
by
wmu
10y ago
107x faster than what? This algorithm is well known, I've seen the equation many years ago.
153.
▲
by
wmu
11y ago
I would add namespaces to your list. They're extremely useful to organize entities of a program. No more prefixes to functions and types names. Also enum classes are pretty useful. Unlike old enums, the labels do not pollute an outer s
154.
▲
by
wmu
11y ago
The worst thing in modern C++ is metaprogramming. It's powerful technique, but the syntax is awful , programs are unreadable & unmaintainable. Moreover, compilers don't help with debugging such code, diagnostics messages rarel
155.
▲
by
wmu
11y ago
> If you can accept working with GNU extensions that are available in recent-ish GCC and Clang I do my private project in C++ so it's not a case, but at my current company we use also MSVC. I wish we could abandon that compiler and
156.
▲
by
wmu
11y ago
I understand you point, however it not as simple as it seems. Of course, for trivial code transition between different SIMD flavors could be seamless. But the world is cruel. :) Think about shuffling instructions (pshufb), lookup vector for
157.
▲
by
wmu
11y ago
Not sure about "single code path". Differences amid SIMD flavors are significant, there are cases when translation one-to-one is either impossible or unpractical. A bright example are AVX2 instructions operating on 128-bit lanes r
158.
▲
by
wmu
11y ago
As other said it's not possible with polynomial curves, but you can get good approximation. Only rational curves can form arcs. Wikipedia has a nice explanation https://en.wikipedia.org/wiki/Non-uniform_rational_B-
159.
▲
by
wmu
11y ago
I did some tests and it seems that the AVX2 code is faster than popcnt when the input size is 512 bytes or more.
160.
▲
by
wmu
11y ago
Hi, author here. You're perfectly right, microbenchmarks have flaws. Procedures should be run for different data sizes (as I did years ago) and code should be compiled with different compilers. And of course the method described in the
161.
▲
by
wmu
11y ago
A good point, I didn't consider IDE support.
162.
▲
by
wmu
11y ago
I totally agree, type inference speed writing a code, nothing more. For easy cases reading such code is OK (var path = "/usr/bin/whatever" - obvious), but with a more complex code it becomes awful. I'm a C++ pr
163.
▲
by
wmu
11y ago
Looks amazing! Really impressive results. Very cool that progressive loading is composed into the format. However I am afraid that without support from biggest companies the format will never gain popularity. Just think how long it took to
164.
▲
by
wmu
11y ago
Really nice and useful article - 10/10 :) It is said that trie consumes too much memory. But the author has chosen a naive representation, while it could be done better. There is mentioned paper about balanced ternary trees - does anyb
165.
▲
by
wmu
11y ago
Impressive artwork, love way how the animations react on the navigation events. I've never seen such nice webpage.
166.
▲
by
wmu
11y ago
Right, I'll fix it.
167.
▲
by
wmu
11y ago
"I like how getting 46% gain over already optimized C code is considered "insignificant". Author here (again!) I used SIMD in different algorithms and often speedup was greater than 2, 3, or more. So, from my skewed point of
168.
▲
by
wmu
11y ago
Indeed my mistake, thanks for pointing it out. Being own proofreader is not an easy job. :)
169.
▲
by
wmu
11y ago
You're right, I haven't aware of that. I'll fix it.
170.
▲
by
wmu
11y ago
Hi, author here. Yes, I've considered these instructions, but couldn't find any advantage over a sequence of plain instructions. The sequence properly deals with invalid inputs, pre-validation with pcmpxstrx isn't required.
171.
▲
by
wmu
12y ago
Fnv is well-know hashing function, like CRC. Names in the code are not the main problem. 1. Structure of the code is a mess: everything lives in the same namespace, while some stuff could be a private properties of classes/structs. 2.