KG.cxx 💻
@aikathg.bsky.social did:plc:tmyif2lansps6apqfgleo4rc
Humano semi-funcional. As vezes posto coisas sobre programação, matemática, xadrez, músicas japonesas, etc. Coshuler, curso técnico em Informática e estudante de CC 🏳️🌈🏳️⚧️
Bluesky’a katılma tarihi:
- Takipçi
- 196
- Takip edilen
- 136
- Post
- 1.340
- Sıralamaya girdiği gün
- 0
Özet
KG.cxx 💻 (@aikathg.bsky.social), 29 Ağustos 2024 tarihinde katılan bir Bluesky kullanıcısı. 196 takipçisi var, 136 hesabı takip ediyor ve 1.340 post paylaştı.
Sıralama geçmişi
Bu hesabın postlarının Debya günlük listesine girdiği en iyi günler.
Bu hesap henüz günlük sıralamaya girmedi.
Son beğendiği postlar
Bluesky ağındaki herkese açık beğeniler.
For the array search part, don't forget that vector instructions exist these days. With SSE2, for example, you can do four 32-bit float comparisons in parallel, _mm_movemask to put the result in an integer register, then bsr/bsf on that. ARM Neon has all this too.
Postu gösterIf you have a lot of floats and you need to binary search, you can use this variant: unsigned logl = ceil_log_2(y.size()); int i = 0; for (unsigned k = 1 << (logl-1); k > 4; k >>= 1) { int t = i + k; if (yt >= y[t]) i = t; // Conditional move instruction }
Postu gösterAfter this, i is now pointing at an aligned subsequence of four floats that you can do the vector comparison trick on. This is the fastest way I've found to do this kind of search on modern hardware, assuming that you can't exploit the distribution of y somehow (e.g. bucketing).
Postu gösterUnfortunately I guess there is none. Perhaps a binary search can help, but I can't think of a O(1) algorithm
Postu gösterI think this is a very sound approach. The rule of thumb I got from my friend who builds fuzzers is that for lists up to ~1000 elements, the fastest thing you can do is a linear search so a good initial guess plus that sounds optimal.
Postu göster
Blokladığı hesaplar
Bluesky’da bloklar herkese açık kayıtlardır.
- did:plc:z7rgym7glaiz65kwnpll5cd4@Not Found
- did:plc:ielvkexk3qnrc632klnzce6y@Not Found
Felipe Neto@felipeneto.com.br
- did:plc:rjhrqvweeusfabbxeauo4sdj@Not Found
- did:plc:zozos7uegfwheqdmeyzilvpp@Not Found
safadenha ✪@ousafadenha.bsky.social
#bolhadev@bolhadev.com
- did:plc:g22ujfeydtes7jgmfktypi5p@Not Found
- did:plc:gfuy5gftguwjtada4vf3dku7@Not Found
- did:plc:yssdb4wcta2pkpidvfo5n7rj@Not Found
Piccolo tá quente pra caraio só @jet77.bsky.social
- did:plc:ehg2btjpht4wsvwjbdq4fp4s@Not Found
CHOQUEI@handle.invalid