Re: [sqlite] [patch] avoid dynamic alloc in vdbeSorterSort(...)

2019-10-09 Thread Dominique Pellé
Keith Medcalf wrote: > > On Monday, 7 October, 2019 14:58, Dominique Pellé < > dominique.pe...@gmail.com> wrote: > > >Here the allocated size is fixed (always 64 pointers), so alloca does > >not seem needed. > > >I wonder how many other functions could avoid dynamic allocation > >like this one

Re: [sqlite] [patch] avoid dynamic alloc in vdbeSorterSort(...)

2019-10-07 Thread Keith Medcalf
On Monday, 7 October, 2019 14:58, Dominique Pellé wrote: >Here the allocated size is fixed (always 64 pointers), so alloca does >not seem needed. >I wonder how many other functions could avoid dynamic allocation >like this one (either with a stack array or alloca). Probably a lot. I would

Re: [sqlite] [patch] avoid dynamic alloc in vdbeSorterSort(...)

2019-10-07 Thread Dominique Pellé
Here the allocated size is fixed (always 64 pointers), so alloca does not seem needed. I wonder how many other functions could avoid dynamic allocation like this one (either with a stack array or alloca). Regards Dominique On Mon, Oct 7, 2019 at 10:26 PM Mateusz Wajchęprzełóż wrote: > > What

Re: [sqlite] [patch] avoid dynamic alloc in vdbeSorterSort(...)

2019-10-07 Thread Mateusz Wajchęprzełóż
What about sqlite3StackAllocZero and SQLITE_USE_ALLOCA? pon., 7 paź 2019 o 20:51 Dominique Pellé napisał(a): > Hi > > Below is a patch which avoids a dynamic > allocation in vdbeSorterSort(...), using a local > stack array instead (faster and smaller code). > I assume that a local array of 64

[sqlite] [patch] avoid dynamic alloc in vdbeSorterSort(...)

2019-10-07 Thread Dominique Pellé
Hi Below is a patch which avoids a dynamic allocation in vdbeSorterSort(...), using a local stack array instead (faster and smaller code). I assume that a local array of 64 pointers is small enough to be in the stack. Is this worth merging? $ fossil diff src/vdbesort.c Index: src/vdbesort.c