[Gdal-dev] C# Bindings

Simon Perkins sy at perkins.net
Sun Nov 5 15:00:59 EST 2006


>> Just to play devil's advocate a little, I'm going to point out that the
>> extra cost involved with allocating an intermediate buffer and copying
>> data for the typesafe versions of Read/WriteRaster() might actually not
>> be that significant...
>>
>>  GDAL already does some intermediate copying of data since internally it
>> reads blocks of data, stores those in a cache, and then copies from
>> there to the user's buffer. In addition, if the block data has to be
>> fetched from disk, the cost of the disk I/O is certain to dwarf the cost
>> of a few extra memory copies...
>>
>
> Would it mean that the requirement about the unsafe methods is obsoleted?

Right. So, for now, let's leave out the unsafe methods then. At some 
point, I might do some speed comparisons between the IntPtr version and 
the typesafe version. If there's a significant speed penalty (which I 
doubt) then we can revisit the idea of adding optional unsafe/fast methods.

Cheers!

Sy




More information about the Gdal-dev mailing list