On Mon, Sep 2, 2013 at 7:51 AM, Bennie Kloosteman <[email protected]>wrote:
> Note the performance cost in C# strings str.SubString ( Indexof( > lookupString) , length) requires creating a new string each time. We > disussed a mutable ptr / length slice lookup previously ( even using a 64 > bit pointer with the length in the high bits) which would be nice but it > wont work with C# string as the array is private. > This discussion is also mixing levels of abstraction. A CLR implementation *could* contain an efficient string-slice implementation, without breaking compatibility for apps. Therefore WRT BitC, we should be asking questions like: (a) is it a problem that string is implementing using runtime tricks which are not avaiable to other apps? how can we make these capabilities available? (b) is it a problem that users can't author their own string-type-compatible string-slice type? If so, how should it be fixed? (c) is it a problem that a particular (open source) CLR (or BitC-VM) does not implement efficient string-slice, if so, just fix it.
_______________________________________________ bitc-dev mailing list [email protected] http://www.coyotos.org/mailman/listinfo/bitc-dev
