Re: [fpc-pascal] re-engineering tool

2018-01-08 Thread Marc Santhoff
On Mon, 2018-01-08 at 08:35 +0100, Marc Santhoff wrote: > On Sat, 2018-01-06 at 18:01 +0100, Marco van de Voort wrote: > > In our previous episode, Marc Santhoff said: > > > Since I'm confronted with the task of analyzing a pile of object > > > pascal > > > sources I'd like to know: > > > > > > Is

Re: [fpc-pascal] Generics vs templates

2018-01-08 Thread Ryan Joseph
> On Jan 9, 2018, at 2:04 PM, Sven Barth via fpc-pascal > wrote: > > But you need to program in a way that allows the usage of multiple, different > types. That can more often than not lead to worse performance. > Examples? I had to add some if statements in a couple areas I didn’t want to

Re: [fpc-pascal] Generics vs templates

2018-01-08 Thread Sven Barth via fpc-pascal
Am 09.01.2018 02:59 schrieb "Ryan Joseph" : > On Jan 9, 2018, at 3:30 AM, Graeme Geldenhuys < mailingli...@geldenhuys.co.uk> wrote: > > Recently I did a very simple test with Delphi XE3 using TList and a stock TList. Adding 50,000 and 200,000 integer values to each list, and timing the creation

Re: [fpc-pascal] Generics vs templates

2018-01-08 Thread Ryan Joseph
> On Jan 9, 2018, at 3:30 AM, Graeme Geldenhuys > wrote: > > Recently I did a very simple test with Delphi XE3 using TList and a > stock TList. Adding 50,000 and 200,000 integer values to each list, and > timing the creation of the list and population of the list. Then I also timed > the de

Re: [fpc-pascal] Generics vs templates

2018-01-08 Thread Giuliano Colla
Il 08/01/2018 21:30, Graeme Geldenhuys ha scritto: I was horified to find out how much slower Delphi's Generics were compared to TList and TObjectList I don't expect FPC behave much better. Whenever you move something from compile time to execution time you may gain in flexibility, but you s

Re: [fpc-pascal] Generics vs templates

2018-01-08 Thread Graeme Geldenhuys
On 2018-01-08 10:58, Sven Barth via fpc-pascal wrote: FPC essentially reparses a generic during specialization so I'd say that they definitely affect compile times. However we're still only doing a single pass of parsing. This while the compilation might be slower it might not be as bad as with a

Re: [fpc-pascal] re-engineering tool

2018-01-08 Thread Mark Morgan Lloyd
On 08/01/18 13:30, Juha Manninen wrote: On Sat, Jan 6, 2018 at 11:46 AM, Marc Santhoff wrote:> Since I'm confronted with the task of analyzing a pile of object pascal> sources I'd like to know:>> Is there any tool that can help me?>> Automatically generating a visual class diagram having uses

Re: [fpc-pascal] Generics vs templates

2018-01-08 Thread Sven Barth via fpc-pascal
Am 08.01.2018 12:52 schrieb "Ryan Joseph" : > On Jan 8, 2018, at 5:58 PM, Sven Barth via fpc-pascal < fpc-pascal@lists.freepascal.org> wrote: > > FPC essentially reparses a generic during specialization so I'd say that they definitely affect compile times. Does c++ not “specialize” in one loca

Re: [fpc-pascal] re-engineering tool

2018-01-08 Thread Juha Manninen
On Sat, Jan 6, 2018 at 11:46 AM, Marc Santhoff wrote: > Since I'm confronted with the task of analyzing a pile of object pascal > sources I'd like to know: > > Is there any tool that can help me? > > Automatically generating a visual class diagram having uses and > aggregation of other classes wou

Re: [fpc-pascal] Generics vs templates

2018-01-08 Thread Ryan Joseph
> On Jan 8, 2018, at 5:58 PM, Sven Barth via fpc-pascal > wrote: > > FPC essentially reparses a generic during specialization so I'd say that they > definitely affect compile times. Does c++ not “specialize” in one location like FPC? looking at c++ code I often see things like Vector used

Re: [fpc-pascal] Generics vs templates

2018-01-08 Thread Mattias Gaertner
On Mon, 8 Jan 2018 14:19:42 +0700 Ryan Joseph wrote: > I was talking with a c++ developer who explained how templates are > implemented in c++ and how use some recursive method which causes them to > totally murder compile times. > Having just started to use generics in FPC myself I was curious

Re: [fpc-pascal] Generics vs templates

2018-01-08 Thread Sven Barth via fpc-pascal
Am 08.01.2018 08:50 schrieb "Ryan Joseph" : I was talking with a c++ developer who explained how templates are implemented in c++ and how use some recursive method which causes them to totally murder compile times. This isn’t the first I’ve heard of the problem though and I recall some game studio

Re: [fpc-pascal] fpc-pascal Digest, Vol 163, Issue 12

2018-01-08 Thread Ingemar Ragnemalm
Den 2018-01-08 kl. 08:49, skrev Sandro Cumerlato: I've done it, let's call it "santa3", it's amazing!:-) [you've made my day] For the last point: yes! Sandro Great! It works just fine! Very neat and tight fix too! And in time before Christmas is *really* over. At least we have snow on the