Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
Const-me
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
18 ms
·
211.
▲
by
Const-me
2y ago
IMO the main reason Raymond Chen is so good at that, he does that a lot. Unless you work for Microsoft, it’s very unlikely your job requires analyzing thousands of crash dumps of random third-party programs. I do that very rarely, and I onl
212.
▲
by
Const-me
2y ago
> There's no risk of the spout sitting in and siphoning dirty toilet water it back into your supply In many places in Europe tap water is safe to drink. However, hot tap water is not. The regulations mentioned by GP might protect sa
213.
▲
by
Const-me
2y ago
> it simply works better this way That is simply not true. > clang messing up x86 intrinsics code The code is correct, and on some processors runs slightly faster than the original. Clang is the only compiler which does anything like
214.
▲
by
Const-me
2y ago
> C with AVX intrinsics or C with NEON intrinsics or C with SVE intrinsics is also 100% non-portable That’s not true because C with SIMD intrinsics is portable across operating systems. Due to differences in calling conventions and other
215.
▲
by
Const-me
2y ago
> FFmpeg team has a weird vendetta against intrinsics To be fair, ffmpeg is really old software. Wikipedia says they released their initial version in the end of 2000. The software landscape was very different. Back then, there were mu
216.
▲
by
Const-me
2y ago
A small piece of advice. Review your changes using a nice GUI diff tool immediately before committing anything to your repo. Lately I use Github for Windows for the tool, but that’s unimportant as long as the tool clearly shows all changes
217.
▲
by
Const-me
2y ago
My previous laptop I bought in 2016 had an Intel Skylake processor with 64MB eDRAM. Specifically, it was based on Intel Core i3-6157U: https://ark.intel.com/content/www/us/en/ark/products/96484&
218.
▲
by
Const-me
2y ago
> frequent hitches caused by the C# garbage collector They probably create too much garbage. It’s equally easy to slow down C++ code with too many malloc/free functions called by the standard library collections and smart pointers.
219.
▲
by
Const-me
2y ago
Found a bug in the article. Maximum for signed bytes is +127, not +128. Minimum is correct, it's -128.
220.
▲
by
Const-me
2y ago
Apple gross revenue is 10x the Qualcomm, and the difference in net income is even larger. Apple could easily afford these R&D costs. Another obstacle, even if Qualcomm develops an awesome emulator / JIT compiler / translation
221.
▲
by
Const-me
2y ago
> If ARM wins, Qualcomm moves to RISC-V Around 30-40% of Android apps published on play store include native binaries. Such apps need to be recompiled for RISC-V otherwise they won’t run. Neither Qualcomm nor Google can do that because t
222.
▲
by
Const-me
2y ago
Seems the implication is socialist sailors are spending someone else’s money on their drink, as opposed to hypothetical capitalist sailors who spend their own money. This is similar to how the AI companies mostly spending VC’s money buying
223.
▲
Cosine Similarity in C++ and SIMD
(github.com)
3 points
by
Const-me
2y ago
|
0 comments
224.
▲
by
Const-me
2y ago
OP’s benchmark doesn’t use the return value from the function being benchmarked. When C++ compilers are asked to optimize such code, they often optimize away the whole function. Pretty sure your 17.7 nanoseconds result had the whole functio
225.
▲
by
Const-me
2y ago
> Intrinsics are faster, but you'll need several Newton-Raphson iterations for precision I wonder have you tried non-approximated intrinsics like _mm_div_ps( mul, _mm_sqrt_ps( div2 ) ) ? The reason standard library is so slow is exc
226.
▲
by
Const-me
2y ago
> which means that not even writing C++ SIMD code will make me have a faster implementation than the one Python is using and I will probably have to write my own assembly code I believe assembly is almost always the wrong choice in moder
227.
▲
by
Const-me
2y ago
That is only true for trivial questions. I've answered dozens of questions on stackoverflow.com with tags like SIMD, SSE, AVX, NEON. Only a minority of these asked for a single SIMD instruction which does something specific. Usually pe
228.
▲
by
Const-me
2y ago
Note that not all problems are compute bound. Many practical problems bottleneck on memory bandwidth. For example, LLM AI inference on a desktop (where you don’t have a dozen of concurrent sessions from multiple users) is guaranteed to be m
229.
▲
by
Const-me
2y ago
> Dec 13, 2017 OK, here’s a newer project which does about the same thing i.e. compiles C# to PTX https://ilgpu.net/ BTW, it supports OpenCL backend in addition to CUDA.
230.
▲
by
Const-me
2y ago
> OP is making up stuff about running code on the CPU because its a 3D engine? I’m not sure CPU-evaluated animations are often critical performance bottlenecks of game engines. > why mention megapixels if you think it's irrelevan
231.
▲
by
Const-me
2y ago
> on targets that aren't in {x32, x86, ARM64}? I have personally shipped embedded Linux software running on 32 bit ARMv7 SoC written mostly in C#. The product is long in production and we’re happy with the outcome. > Does it targ
232.
▲
by
Const-me
2y ago
> it takes effort to make a standard library vector worse than a manually optimized one A simple use case is a 2D array where rows are padded to be multiples of 32 bytes (size of AVX SIMD vectors, saves a lot of implementation complexity
233.
▲
by
Const-me
2y ago
On AMD64 Windows, .NET 8.0 runtime takes 31.7 MB to download, and 70.7 MB on disk. On ARM64 Linux, the numbers are 28.4 MB and 75.0 MB, respectively. For that amount of data, both internet bandwidth and disk space are rather cheap these day
234.
▲
by
Const-me
2y ago
> I could get effectively the same performance with containers and move semantics When I’m happy with the level of performance delivered by idiomatic C++ and standard collections, I tend to avoid C++ all together because I also proficien
235.
▲
by
Const-me
2y ago
> Isn't this obviously true? To an extent sure, but we’re talking about low level micro-optimizations. Games don’t animate individual pixels. I don’t think animating 1000 things per frame gonna saturate a CPU core doing these comput
236.
▲
by
Const-me
2y ago
> Those languages don't come with mechanisms to let you to make system calls directly or handle the precise memory structure of the data Here’s a C# library for Linux where I’m doing all these things https://github.com&#x
237.
▲
by
Const-me
2y ago
> It is very high-performance, as animation evaluation has to be Are you sure evaluating these animations is performance critical? I doubt games have enough data to saturate a CPU core doing that. Screens only have 2-8 megapixels; animat
238.
▲
by
Const-me
2y ago
> Non-trivial data structures are often just a bunch of arrays/maps with additional semantics This might be fine for code which consumes data structures implemented by other people. The approach is not good when you actually need to
239.
▲
by
Const-me
2y ago
> I just do not see why people seem to use "unsafe" so much Because it’s impossible to implement any non-trivial data structures in safe Rust. Even Vec has unsafe code in the implementation to allocate heap memory. When you nee
240.
▲
by
Const-me
2y ago
I don’t think search monopoly is an important issue. The main issue Google is a monopoly for multiple levels of the stack. A good internet search engine would deprioritize low quality stuff like ad-infested clones of Wikipedia, stackoverflo
More ›