Passing a Slice to a function
What is happening when I pass a slice of a list to a function?
With these examples (very contrived, but reflective of what I'm seeing in larger real code), passing a slice of a list to a function of signature
The signature of
With these examples (very contrived, but reflective of what I'm seeing in larger real code), passing a slice of a list to a function of signature
borrowed items: List[UInt8] is waaaaayyyy slower than any other way. Is it allocating a new copy on a slice? Should I be looking into Span's instead? Or is this an area still being looked at https://github.com/modularml/mojo/issues/3653 ?The signature of
__getitem__ for List makes it look like it returns a ref to itself though, which seemingly wouldn't need to allocate?GitHub![[Feature Request] [stdlib] [proposal] Have all `fn __getitem__(self...](https://images-ext-1.discordapp.net/external/S1B-Owj3BGxF9SSEmGbslJkrsEH-t8lucJYFuNw-ZQc/https/opengraph.githubassets.com/fcdf431ef69294ab4de995a4ead3cd750a3efcc805f40b748833aff5a2b8169b/modularml/mojo/issues/3653)
Review Mojo's priorities I have read the roadmap and priorities and I believe this request falls within the priorities. What is your request? Once we have Iterators designed or right now using ...
