mirror of
https://github.com/storytold/lightcraft.git
synced 2026-11-01 14:07:34 -06:00
A person's page (and every face confirmed there) compares each unnamed face with each of the person's named faces on the UI thread, on one core: 92 000 unnamed faces against 4 100 named ones is some 400 million 512-long dot products, about 2 min 40 s on an Apple M1 Pro with the window frozen. - matching::cosine sums in eight lanes, which the compiler vectorizes (about 4x faster on 512-long embeddings; same result to the last bits). - matching::person_score: one person's score as rank gives it, with no names to group by and nothing allocated (same score, tested). - similar() scores the candidates with rayon: about 3 s in the same case (benchmark at that scale: 163 s before, 3 s after). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>