-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
slice and makeSlice should accept ranges #81
Comments
Current version is already clear |
for |
... but not efficient as |
No, it is already fast |
see implementation |
Yeah just saw it - ignore my complaints for now. sorry. |
It does make a huge difference - m1 and m3 take roughly twice the time (I guess the 20% are the overhead created from
|
LDC results? |
nope - dmd, but with
|
|
add |
ldc: Unknown command line argument '-disable-boundscheck'. Try: 'ldc -help' |
ok, lets just |
done - I was shocked a bit initially because the runtime went done from 20s to less than a second, but I added a global variable (which is printed) to add the result of the verification assert.
I verified the output by running in multiple orders. |
oh, I thought the implementation is differ. Thanks, will be fixed |
Fixed |
Reason: When one uses an input range like
iota
oriotaSlice
which is doesn't allow modifications (=doesn't implement lvalue index), the following two don't work:However when using the new allocation APIs, we can allocate memory:
Thus imho it would be nice if
slice
directly accepts a range, that fills the allocated array.Basically a short wrapper around:
What do you think?
The text was updated successfully, but these errors were encountered: