expose the GodotString char slice via chars_checked and chars_unchecked by lassade · Pull Request #161 · godot-rust/gdext (original) (raw)

Yeah, I just want some chars :) all this work so the CPU can be lazy

  1. The SSE code is quite big, I don't have the know-how to review it for correctness. How can we be sure it's a) correct and b) portable?

Highly portable, SSE2 it got introduced on the Intel Pentium 4, but both is_x86_feature_detected!("sse2") and is_aarch64_feature_detected!("neon") corvers up for any cpu that doesn't have it. I never saw a 64 bit ARM that didn't had NEON

2. Do you know how big the speed-up from using that as opposed to linear search is? Just to get an idea how much we gain.

SSE2 gives a throughput of 12.808 GiB/s while the scalar version gives 3.4234 GiB/s, so a solid 4 times speed up!

My code was a bit wrong but I already it fixed (SSE2 uses signed math) a part from that the SIMD impl is simple it uses 7 intrinsics and is was fully tested, so unless the definition of unicode scalar value changes you shouldn't need to mess with it and even if you do you can always just get rid of it and keep only the scalar version.

Sure. But how hard it will be to move the entire crate to core? hahahah, let me explain Gotdot is moving to the consolo space right, so if we are using std this means that we must build the std for each platform, it's hard and adds a extra point of failure. But don't worry about it

Sure