News for hackers. Stuff that matters.
Re:Neat Rust Tricks: Passing Closures to C by loeg on Monday November 25, 2019 @07:25PM (#21634431)
I don't think qsort changes anything about the mechanism described in the blog post, but maybe I'm missing something. (I.e., use qsort_r...)

(qsort is really only for C. Other languages can potentially inline the comparison function, so using FFI for that is kind of insane.)

Re:Neat Rust Tricks: Passing Closures to C by 0db532a0 on Tuesday November 26, 2019 @03:06AM (#21636412)
Gets me thinking: I wonder how good Intel CPUs are with dealing with this sort of thing. Can the CPU detect repeated jumps to comparators and in-line them from there? I’d be interested to see a comparative benchmark.