About the macro blocks that involve operations around using libc for implementation of PartialEq and Ord.
#[cfg(all(feature = "libc", not(target_os = "unknown")))]
#[macro_export]
#[doc(hidden)]
macro_rules! impl_libc_for_fixed_hash { ... }
Question: Is this feature (using libc instead of core) actually useful and used?
Thesis: The compiler should be able to do this optimization by itself.
@pepyakin told in another PR Link
hm, I was almost sure that self.as_bytes() == other.as_bytes()/self.as_bytes().cmp(other.as_bytes()) should be lowered down to memcmp.
Besides this, existence of an OS around isn't requisite for using memcmp et al since they assumed to always exists by the compiler (or rather LLVM). In wasm32-unknown-unknown they're pulled from the compiler-builtins lib.
Todo:
- Make some benchmarks to test the above thesis.
- If benchmarks are in favor of the compiler doing this, remove the libc feature and code surrounding it.
About the macro blocks that involve operations around using libc for implementation of
PartialEqandOrd.Question: Is this feature (using
libcinstead ofcore) actually useful and used?Thesis: The compiler should be able to do this optimization by itself.
@pepyakin told in another PR Link
Todo: