Re: [fpc-devel] Standard generic classes

2019-06-08 Thread Sven Barth via fpc-devel
Marco van de Voort schrieb am Sa., 8. Juni 2019, 13:43: > > Op 2019-06-06 om 16:57 schreef Ben Grasset: > > On Wed, Jun 5, 2019 at 11:11 AM Sven Barth via fpc-devel > > > > wrote: > > > > You could try to adjust the FGL unit to use the pluggable

Re: [fpc-devel] Standard generic classes

2019-06-08 Thread Marco van de Voort
Op 2019-06-06 om 16:57 schreef Ben Grasset: On Wed, Jun 5, 2019 at 11:11 AM Sven Barth via fpc-devel > wrote: You could try to adjust the FGL unit to use the pluggable sorting system introduced here:

Re: [fpc-devel] Standard generic classes

2019-06-08 Thread Benito van der Zander
An object based container library would also be helpful. With classes stored on the heap you always need additional memory access. Just one, but that is already bad in performance critical loops Best, Benito Am 06.06.19 um 18:23 schrieb George Bakhtadze: It would be also great if there

Re: [fpc-devel] Standard generic classes

2019-06-06 Thread J. Gareth Moreton
You are right George.  I'm not entirely sure what the standards are with everything, but it would be nice to have something public and concrete.  Things that already exist cannot have their API changed - they can be refactored, but as a black box it might be completely identical.  Things like

Re: [fpc-devel] Standard generic classes

2019-06-06 Thread George Bakhtadze
It would be also great if there was an official set of interfaces (not necessarily in interface type form but API description) describing all these generic containers and algorithms.Thus, all implementations which follow these interfaces are interchangeable.I believe this is even more important

Re: [fpc-devel] Standard generic classes

2019-06-06 Thread Ben Grasset
On Wed, Jun 5, 2019 at 11:11 AM Sven Barth via fpc-devel < fpc-devel@lists.freepascal.org> wrote: > You could try to adjust the FGL unit to use the pluggable sorting system > introduced here: > https://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revision=41167 > Wouldn't that system itself need

Re: [fpc-devel] Standard generic classes

2019-06-05 Thread J. Gareth Moreton
Still, the theory's there just in case... if the arguments are constant (but unknown) and the pure function is called multiple times, then it can be optimised to only be called once. Gareth aka. Kit On 06/06/2019 01:08, J. Gareth Moreton wrote: Ah, fair enough.  I didn't think to study the

Re: [fpc-devel] Standard generic classes

2019-06-05 Thread J. Gareth Moreton
Ah, fair enough.  I didn't think to study the for-loop that closely yet since I haven't really found a need to check its code.  Sometimes I feel silly blurting out my ideas like this, but at least you stopped me from doing a fool's errand.  Thanks. Gareth aka. Kit On 05/06/2019 22:38, Sven

Re: [fpc-devel] Standard generic classes

2019-06-05 Thread Sven Barth via fpc-devel
J. Gareth Moreton schrieb am Mi., 5. Juni 2019, 18:06: > > *for *X := 0 *to *Min(BUFFER_SIZE, DataLeft) *- 1 do* > *begin* > { Do some work that doesn't modify DataLeft } > *end*; > > Say that Min is given the *pure *directive, BUFFER_SIZE is a *const *and > DataLeft is a property or some

Re: [fpc-devel] Standard generic classes

2019-06-05 Thread J. Gareth Moreton
Sounds fun.  I'm currently working on a personal project to put into my online Github in order to show off to prospective employers, so it might be a while before I get around to that. On another note, I'm also still waiting on Pierre to approve my XML node dump, since he and I have been

Re: [fpc-devel] Standard generic classes

2019-06-05 Thread Sven Barth via fpc-devel
J. Gareth Moreton schrieb am Mi., 5. Juni 2019, 14:52: > Sounds fair. I would be trying for a refactoring approach, in that the > API and outward behaviour is identical to before (i.e. a black box), but > the inner workings are better. I noticed that one potential source of > improvement is

Re: [fpc-devel] Standard generic classes

2019-06-05 Thread J. Gareth Moreton
Sounds fair.  I would be trying for a refactoring approach, in that the API and outward behaviour is identical to before (i.e. a black box), but the inner workings are better.  I noticed that one potential source of improvement is changing the Quicksort algorithm, used in most of the sorting,

Re: [fpc-devel] Standard generic classes

2019-06-05 Thread Michael Van Canneyt
On Wed, 5 Jun 2019, J. Gareth Moreton wrote: Still, saying all that, maybe there's room for improvement in rtl-generics in the form of refactoring, like I've found in the compiler itself in a few places.  When you say 'heavyweight', do you mean it's a little slow sometimes or just very

Re: [fpc-devel] Standard generic classes

2019-06-05 Thread Sven Barth via fpc-devel
J. Gareth Moreton schrieb am Mi., 5. Juni 2019, 14:27: > Still, saying all that, maybe there's room for improvement in rtl-generics > in the form of refactoring, like I've found in the compiler itself in a few > places. When you say 'heavyweight', do you mean it's a little slow > sometimes or

Re: [fpc-devel] Standard generic classes

2019-06-05 Thread Sven Barth via fpc-devel
J. Gareth Moreton schrieb am Mi., 5. Juni 2019, 11:54: > Hah, oh that sounds fun! > > I would develop something more lightweight and efficient, but that would > just make a 4th poison to choose from. > As Ben mentioned there is also LGenerics which is a third party library, so there already is

Re: [fpc-devel] Standard generic classes

2019-06-05 Thread J. Gareth Moreton
Still, saying all that, maybe there's room for improvement in rtl-generics in the form of refactoring, like I've found in the compiler itself in a few places.  When you say 'heavyweight', do you mean it's a little slow sometimes or just very bulky when it comes to code size? (Taking a brief

Re: [fpc-devel] Standard generic classes

2019-06-05 Thread J. Gareth Moreton
Hah, oh that sounds fun! I would develop something more lightweight and efficient, but that would just make a 4th poison to choose from. Gareth aka. Kit On 05/06/2019 08:01, Sven Barth via fpc-devel wrote: J. Gareth Moreton > schrieb am Di., 4. Juni 2019,

Re: [fpc-devel] Standard generic classes

2019-06-05 Thread Sven Barth via fpc-devel
J. Gareth Moreton schrieb am Di., 4. Juni 2019, 22:40: > Hi everyone, > > I may be missing the obvious here, but I've noticed that there are some > notable absences in the Free Generics Library. While there's a standard > list and a map and the like, there aren't any of the special lists like >

Re: [fpc-devel] Standard generic classes

2019-06-04 Thread J. Gareth Moreton
I feel so silly now. Thank you. Gareth aka. Kit On Tue 04/06/19 22:14 , Ben Grasset operato...@gmail.com sent: > On Tue, Jun 4, 2019 at 4:40 PM J. Gareth Moreton wrote: > I may be missing the obvious here, but I've noticed that there are some > notable absences in the Free Generics

Re: [fpc-devel] Standard generic classes

2019-06-04 Thread Ben Grasset
On Tue, Jun 4, 2019 at 4:40 PM J. Gareth Moreton wrote: > I may be missing the obvious here, but I've noticed that there are some > notable absences in the Free Generics Library. > All of that stuff is available in "rtl-generics" (currently trunk-only, but AFAIK works on 3.0.4 if you copy the

[fpc-devel] Standard generic classes

2019-06-04 Thread J. Gareth Moreton
Hi everyone, I may be missing the obvious here, but I've noticed that there are some notable absences in the Free Generics Library.  While there's a standard list and a map and the like, there aren't any of the special lists like a stack and a queue and the like.  It proved slightly