fizyk20 / generic-array

Generic array types in Rust
MIT License
405 stars 77 forks source link

How about the speed? #141

Closed oilel closed 1 year ago

oilel commented 1 year ago

How fast is GenericArray::from()?

novacrazy commented 1 year ago

It's a no-op with any opt-level > 0. It's just a transmute.

oilel commented 1 year ago

It's a no-op with any opt-level > 0

So why aren't arrays or vectors generic, in Rust standard library?

novacrazy commented 1 year ago

I don't fully understand your question. Currently, in pre-1.0 versions of generic-array, it was designed to be used in versions of Rust without const-generics, so for what size of arrays are supported with From is limited.