[Mono-dev] MonoListWrapper WIP - code review/feedback

rfine at tbrf.net rfine at tbrf.net
Thu Jul 18 17:16:55 UTC 2013


Hello,

I've been working on a little wrapper library for working with 
System.Collections.Generic.List<T> instances from native code. The 
motivation is to provide a way for Mono embedders to easily design APIs 
that use List<T> instances as output buffers, whilst running as quickly 
as possible and with minimal allocations. Presently I'm getting around a 
30x speedup for bulk loading a chunk of data, compared to allocating a 
new array to return that data in. Particular users I envision for this 
are game engines like Unity3D.

Any chance I could get a review of what I've done so far? It's just a 
couple of files, plus a short readme:

https://github.com/richard-fine/mono/tree/MonoListWrapper/contrib/MonoListWrapper

I'm interested in any "there's a better way to do this" observations, 
suggestions for things I should add, ways to speed up the new-array 
cases, bugs you can spot, or any generally "un-Mono" things about it.

Thanks for any feedback,

- Richard


More information about the Mono-devel-list mailing list