[gdal-dev] Starting a discussion on style and coding guidelines

Andrew Bell andrew.bell.ia at gmail.com
Mon May 9 13:37:20 PDT 2016


On Mon, May 9, 2016 at 2:49 PM, Mateusz Loskot <mateusz at loskot.net> wrote:

>
> Point taken.
>
> Although the proposal looks OK, I'd suggest to check what
> assembler code generates your favourite C++ toolkit,
> or at least measured times for
>
> int anVals[256];
> memset(anVals, 0, 256*sizeof(int));
>

Are "we" doing memset anymore in these cases?

int anVals[256] = {};

seems preferable


> vs
>
> std::vector<int> oVals(256, 0);
>
> and compare with:
>
> std::vector<char> oVals(256, 0);
>

Think vector is a bad solution for something that's fixed.  Just write
something.  But I already suggested that and wrote something... :)

Do you know why they are wedded to a 16K stack?

-- 
Andrew Bell
andrew.bell.ia at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20160509/0f63dfc9/attachment.html>


More information about the gdal-dev mailing list