Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
stabbles
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
25 ms
·
361.
▲
by
stabbles
4y ago
See also http://0x80.pl/articles/simd-strfind.html The basic idea there is: - mask_start = (64 chars from idx i) & (first letter) - mask_end = (64 chars from idx i + len - 1) & (last letter) if mask_start &
362.
▲
by
stabbles
4y ago
https://github.com/openai/tiktoken/blob/main/tests/test_simp...
363.
▲
by
stabbles
4y ago
Sounds like it could be optimized to run 10x faster on a single thread. ~7MB/s is not that fast
364.
▲
by
stabbles
4y ago
It makes perfect sense when writing and reading strings from disk, since you don’t have to worry where and how to store the integer for the length (#bytes & endianness)
365.
▲
by
stabbles
4y ago
Funnily enough the ads on this page take as much space as the blog post
366.
▲
I/O still is the bottleneck
(stoppels.ch)
2 points
by
stabbles
4y ago
|
0 comments
367.
▲
I/O is no longer the bottleneck?
(stoppels.ch)
4 points
by
stabbles
4y ago
|
0 comments
368.
▲
by
stabbles
4y ago
Using GNU make you can get very nice output sync: all: variant-1 variant-2 @echo done with all variant-%: @echo starting $@ @sleep 1 @echo done $@ Use `make -j2 --output-sync=target`.
369.
▲
by
stabbles
4y ago
> but I don't think any language is going to offer that out of the box. That's what compilers are for. I tried to improve the C version to make it friendlier to the compiler. Clang does a decent job: https://godbolt.
370.
▲
by
stabbles
4y ago
The title I/O is _no longer_ the bottleneck seems to suggest disk speed has caught up, while in reality the slowness is due to poor implementation (slow Python or Go with lots of allocations). The real problem to me is that languages a
371.
▲
by
stabbles
4y ago
I always find it funny how there's wear of images on the internet, just like in real life
372.
▲
by
stabbles
4y ago
Is the 2022 in the bound there cause it's sharpest or because he happened to have the freedom to pick it equal to the year of publication?
373.
▲
by
stabbles
4y ago
I guess it won't work for rich editors that create tons of elements for every style applied, like `<b><span style=font:...><span style=...>...<i>...` it requires some sanity of the editor.
374.
▲
by
stabbles
4y ago
sudo feels like a broken concept to me in general. sudo make install, ok, great, some of the many operations you need to do requires privileges? Better give elevated privileges to all operations! Even worse with GUI: enter your password t
375.
▲
by
stabbles
4y ago
If you are tired of the frequency of CVEs in OpenSSL, consider sending a formal complaint to maintainers@openssl.org\0hunter2
376.
▲
by
stabbles
4y ago
Even a 2x faster Python still makes a terribly slow language. Improvements look amazing relative to old Python. But compare it to PHP, Javascript, Lua. Ok, it might be better than Ruby sometimes.
377.
▲
by
stabbles
4y ago
Another nice tool is the Julia repl: julia> 1.4 + eps(1.4) === nextfloat(1.4) true julia> bitstring(1.4) "0011111111110110011001100110011001100110011001100110011001100110" julia> bitstring(nextfloa
378.
▲
by
stabbles
4y ago
I upgraded from Ubuntu 20.04 to 22.04 recently, and am experiencing issues where Firefox feels sluggish and X hangs for a second when I type in the terminal too quickly. Makes me wanna move away from Ubuntu. Also the idea of these major upd
379.
▲
by
stabbles
4y ago
My guess: in C++ it's templated and header-only, which means optimized hash table code gets generated for the types you use it for, and you don't pay for it in binary size when you don't use it. In C you get stuff like qsort
380.
▲
by
stabbles
4y ago
> I opted for a hash table, as conveniently implemented by glib, which QEMU already depends on I wonder how many C projects use linear scans instead of hash maps simply because C doesn't have it in its standard library.
381.
▲
by
stabbles
4y ago
You're not talking about shuffle, you're talking about broadcast. Shuffle instructions is where you take one or two vectors, and output a third with elements from any index of the input. So for example `out = [in[2], in[1]]` is a
382.
▲
by
stabbles
4y ago
On a related note, I feel that some websites at are a point where they're complete, and adding new features makes the experience worse. Take Github: to me it feels that it's now at an optimum where adding new features that make it
383.
▲
by
stabbles
4y ago
The optimization is under -O1 in gcc, and can be turned off with `-fno-merge-constants`. However, if you use lld as a linker, strings are duplicated by default. To merge them, you need `gcc -O1 -Wl,-O3 -fuse-ld=lld`. So, it is a combination
384.
▲
by
stabbles
4y ago
Seems like C++ is having an identity crisis lately
385.
▲
by
stabbles
4y ago
It doesn't require sudo install, you can just download and extract it and you're done.
386.
▲
by
stabbles
4y ago
See also https://simonbyrne.github.io/notes/fastmath/ for a similar story in julia, where ffast-math is now banned for C/C++/Fortran dependencies
387.
▲
by
stabbles
4y ago
It works there too $ apk add gcc libc-dev $ gcc -shared -o hello -Wl,--entry,main hello.c -D 'PT_INTERP="/lib/ld-musl-x86_64.so.1"' $ gcc -o main main.c -L. -l:hello -Wl,-rpath,. $ ./main
388.
▲
Shared Libraries as Executables
(stoppels.ch)
125 points
by
stabbles
4y ago
|
62 comments
389.
▲
by
stabbles
4y ago
Sure enough original, quality content will be generated by AI
390.
▲
Stop Searching for Shared Libraries
(stoppels.ch)
1 points
by
stabbles
4y ago
|
0 comments
More ›