Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
Const-me
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
45 ms
·
601.
▲
by
Const-me
3y ago
Given the constraints, the proposed implementation is not efficient at all. Here’s a quick benchmark to compare two implementations: https://gist.github.com/Const-me/265b8a3e89f17f4268d34d64771... In theory, the hash m
602.
▲
by
Const-me
3y ago
I usually avoid solving that problem. There’s a good workaround — batch items, and either transfer ownership, or implement shared ownership, instead of copy. For an example, look at how multimedia frameworks are designed: Media Foundation,
603.
▲
by
Const-me
3y ago
The pixel shader is cool, but consumes too much resources. On my 1080Ti, uses about 20% of GPU to render, which is too expensive for such a simple graphics. I’ve looked at the source, and it seems you’re doing too much computations there. M
604.
▲
by
Const-me
3y ago
I believe these green threads work well when there’s good support in both language, runtime and standard library. I have built complicated concurrent software in C# with async-await. I don’t program golang but I heard the concurrency model
605.
▲
by
Const-me
3y ago
As a developer, I often choose higher-level APIs not listed in that article. On Windows, OSX and iOS the OS userland already implements general, and relatively easy to use, thread pools. On Windows, see CreateThreadpoolWork, WaitForThreadpo
606.
▲
by
Const-me
3y ago
The problem with Tai time, in offline systems it’s impossible to implement calendars on top. To translate Tai time to human-readable one, you gonna need a database of adjustments. We only have that data for very small interval of dates betw
607.
▲
by
Const-me
3y ago
I think Microsoft did it better back in 1993. They’re also using 64-bit numbers for datetime, but these numbers are integers, expressed in 100 nanoseconds ticks. That representation is used in NTFS, other components of Windows kernel and us
608.
▲
by
Const-me
3y ago
These GPUs aren’t too bad. Theoretically, M2 Max peaks at 14.4 teraflops, and 400 GB/s memory bandwidth. M2 Ultra is too new, but Apple says it’s GPU is 30% faster (probably 18.7 teraflops then?), and that it has 800 GB/s memory b
609.
▲
by
Const-me
3y ago
I once did that as well: https://github.com/Const-me/AvxMath/blob/master/AvxMath/AvxM... The method is different, and the OP hasn’t mentioned it — high-degree minimax polynomial approximation.
610.
▲
by
Const-me
3y ago
I don’t know, it depends on the specific library. If they were compiling for least-common denominator like SSE2, recompiling with -march=native might make a difference. The exact amount of that difference depends heavily on the code. Automa
611.
▲
by
Const-me
3y ago
I touched that question in "Hardware Support" section, on page 6 of that article http://const.me/articles/simd/simd.pdf TLDR: SSE1 and SSE2 are parts of the base AMD64 ISA, they are always available whil
612.
▲
by
Const-me
3y ago
Documents are pretty much everywhere. In many cases they are mutable because user needs to edit them, and on the web JavaScript code needs to dynamically modify them. According to debugging tools in my web browser, your <div class=commen
613.
▲
by
Const-me
3y ago
I have a similar model of HP Probook. I'm 100% certain I did clean install, HP does not even sell this model with 2TB SSD.
614.
▲
by
Const-me
3y ago
Sadly, this is no longer true. At least, not for modern laptops. It's possible to achieve what you wrote, but the complexity of doing that is borderline impossible. Need to set up group policies, or use custom software, to block instal
615.
▲
by
Const-me
3y ago
CD-R drives were already common in 2001: https://en.wikipedia.org/wiki/CD-R I wonder would a CD-R disk retain data for these 22 years?
616.
▲
by
Const-me
3y ago
For a single-purpose device running custom software you wrote, I would consider Linux which is not an Android. Couple years ago, I wanted something similar on a smartphone, and postmarketOS https://postmarketos.org/ worked
617.
▲
by
Const-me
3y ago
The API you have linked is too low level to my taste. When I wanted to play video and render them inside D3D12 scenes, I have used a higher-level one, IMFMediaEngine https://learn.microsoft.com/en-us/windows/win32&
618.
▲
by
Const-me
4y ago
It’s surprisingly difficult to emulate the `vcvtps2ph` instruction. I recently tried to, and tested a few open-source libraries. None of them did the trick, they all failed. I made a test to convert all 4 billion of possible FP32 values, an
619.
▲
by
Const-me
4y ago
It’s not a database format, it’s an image format. They are typically used in conjunction with a graphical display capable of rendering these images. I don’t think many of these legacy BE systems have such a thing. AFAIK most of these system
620.
▲
by
Const-me
4y ago
Designing software for hypothetical future which is very unlikely to happen is a classic case of overengineering. Little-endian platforms have won, very few people are targeting MIPS, power or SPARC processors these days. Technically some A
621.
▲
by
Const-me
4y ago
Yeah, computational cost is indeed pretty close to zero. However, mental overhead of developers, and technical complexity of the implementation, is not zero. These things cost development time, and most importantly they cause bugs. A princi
622.
▲
by
Const-me
4y ago
When I want compressed images, I prefer lossy codecs supported by GPUs. A nice thing about them, they decompress on demand by GPU cores, thus saving not just storage, also VRAM bandwidth. For color images on Windows, D3D 11.0 and newer vers
623.
▲
by
Const-me
4y ago
It seems that question can be interpreted in two ways: 1. Do you have a link which proves the implementation being discussed is CPU-only? 2. Do you have a link to the official Python-based implementation? When I wrote the above answer, I wa
624.
▲
by
Const-me
4y ago
Source code: https://github.com/ggerganov/llama.cpp
625.
▲
by
Const-me
4y ago
It can not, that particular library is CPU-only. If you want to run on GPU, use the official Python-based stack, which BTW takes about 10GB of runtime binaries on disk, and only supports nVidia GPUs because CUDA.
626.
▲
by
Const-me
4y ago
llama.cpp doesn't need nor use GPU. You can run on Linux, but you gonna need a CPU with AVX2 support.
627.
▲
by
Const-me
4y ago
The original llama uses google's tooling for that, written in C++ https://github.com/google/sentencepiece
628.
▲
by
Const-me
4y ago
Visual studio C++ compiler is very comparable to the rest of them. I think the OP got screwed by cmake. While it technically supports Windows, the level of support is not great. To make fast binaries with Visual C++, use Visual Studio to cr
629.
▲
by
Const-me
4y ago
> What is wrong with advocating for peace? Advocating for peace while an invasion is ongoing = advocating for the invader. The worst of it, Russians haven't just invaded and called it a day, they doing horrible things to Ukrainians
630.
▲
by
Const-me
4y ago
> complexity ceiling is much higher on macro-ops than micro-ops, right? Other examples are crc32, sha1rnds4, aesdec, aeskeygenassist - the math they do is rather complicated, yet on modern CPUs they are single micro-op each. > one (ve
More ›