Void pointers

Alex via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon May 16 15:43:29 PDT 2016


On Monday, 16 May 2016 at 22:28:04 UTC, ag0aep6g wrote:
>
> I can't say that I understand the setup you describe. But are 
> you sure that iota has a higher cost than (ab)using a slice?
>
> I mean, they're pretty much exactly the same: an offset, a 
> length, and an increment operation. If inlining doesn't fail, 
> they should perform the same, no?

Maybe. I should test this...
>
> And if iota does perform worse for some reason, I feel like 
> there must be a way to implement something that matches the 
> speed of the slice without inheriting its ugliness.

:)
The point is, that in my model the slice has a meaning itself. 
So, the language provides one of a needed constructs...



More information about the Digitalmars-d-learn mailing list