Re: [fpc-devel] The 15k bounty: Optimizing executable speed forLinux x86 / LLVM

2018-10-27 Thread J. Gareth Moreton
To add my two pence to this: Low-level optimisation is my personal speciality.  Currently a lot of what I do is on small savings within the peephole optimizer on x86 systems.  Generally the result is that the compiler runs slightly more slowly, but the final binary runs a bit more efficiently -

Re: [fpc-devel] The 15k bounty: Optimizing executable speed for Linux x86 / LLVM

2018-10-27 Thread Ben Grasset
On Sat, Oct 27, 2018 at 8:22 PM Ozz Nixon wrote: > * Sorry for off topic - just that grabbed my "What did he just say?" > button.. > Huh? I said "Also linked lists absolutely everywhere, that would perform much better as array based lists." Meaning, exactly the same thing you just implied. You

Re: [fpc-devel] The 15k bounty: Optimizing executable speed for Linux x86 / LLVM

2018-10-27 Thread Ozz Nixon
SORRY - JUST RE-READ... that is what you are saying... it's late here ;-( On Sat, Oct 27, 2018 at 8:22 PM Ozz Nixon wrote: > * Not arguing, but... * > > Linked List faster than Array? > Unless I missed what you are talking about... I always teach programmers: > > Array is the fastest collection

Re: [fpc-devel] The 15k bounty: Optimizing executable speed for Linux x86 / LLVM

2018-10-27 Thread Ozz Nixon
* Not arguing, but... * Linked List faster than Array? Unless I missed what you are talking about... I always teach programmers: Array is the fastest collection to use, followed by Linked List, followed by bTree, etc. * Sorry for off topic - just that grabbed my "What did he just say?" button...

Re: [fpc-devel] The 15k bounty: Optimizing executable speed for Linux x86 / LLVM

2018-10-27 Thread Ben Grasset
On Sat, Oct 27, 2018 at 6:46 PM Sven Barth via fpc-devel < fpc-devel@lists.freepascal.org> wrote: > Except of course for optimizations that can be done on the platform > independent node tree. > That specifically is IMO the "key" to a higher compiler-wide level of optimization capabilities, as sh

Re: [fpc-devel] The 15k bounty: Optimizing executable speed for Linux x86 / LLVM

2018-10-27 Thread Sven Barth via fpc-devel
Ben Grasset schrieb am So., 28. Okt. 2018, 00:29: > On Sat, Oct 27, 2018 at 1:38 PM Florian Klämpfl > wrote: > >> That it is useful to work on table based exception handling for all >> targets >> > > Not arguing with that at all. I was just trying to point out that I'm not > a fan of the idea th

Re: [fpc-devel] The 15k bounty: Optimizing executable speed for Linux x86 / LLVM

2018-10-27 Thread Ben Grasset
On Sat, Oct 27, 2018 at 1:38 PM Florian Klämpfl wrote: > That it is useful to work on table based exception handling for all targets > Not arguing with that at all. I was just trying to point out that I'm not a fan of the idea that FPC's code generators are "good enough" as is. _

Re: [fpc-devel] The 15k bounty: Optimizing executable speed for Linux x86 / LLVM

2018-10-27 Thread Florian Klämpfl
Am 27.10.2018 um 19:19 schrieb Michael Van Canneyt: > > > On Sat, 27 Oct 2018, Florian Klämpfl wrote: > >> If you read the whole thread, LLVM needs a rewritten exception handling as >> well. Further, a quick test >> of table based exception handling on bansi1 (which is mainly a memory >> manag

Re: [fpc-devel] The 15k bounty: Optimizing executable speed for Linux x86 / LLVM

2018-10-27 Thread Michael Van Canneyt
On Sat, 27 Oct 2018, Florian Klämpfl wrote: If you read the whole thread, LLVM needs a rewritten exception handling as well. Further, a quick test of table based exception handling on bansi1 (which is mainly a memory manager test) gives: standard exception handling: fpctrunk\tests\bench>pp

Re: [fpc-devel] The 15k bounty: Optimizing executable speed for Linux x86 / LLVM

2018-10-27 Thread Florian Klämpfl
Am 27.10.2018 um 18:21 schrieb Ben Grasset: > On Sat, Oct 27, 2018 at 8:47 AM Jonas Maebe > wrote: > > On 27/10/18 05:45, Ben Grasset wrote: > >    > > You also need "opt" if you want to perform full optimizations (or just > use clang, which a.o. combine

Re: [fpc-devel] The 15k bounty: Optimizing executable speed for Linux x86 / LLVM

2018-10-27 Thread Ben Grasset
On Sat, Oct 27, 2018 at 8:47 AM Jonas Maebe wrote: > On 27/10/18 05:45, Ben Grasset wrote: > You also need "opt" if you want to perform full optimizations (or just > use clang, which a.o. combines the functionality of llc and opt). > > There's one more problem I forgot to mention in my first p

Re: [fpc-devel] The 15k bounty: Optimizing executable speed for Linux x86 / LLVM

2018-10-27 Thread Jonas Maebe
On 27/10/18 05:45, Ben Grasset wrote: As far as dependencies, it would add none whatsoever other than a copy of the LLC or LLVM-AS binaries (as in, no more than any other target FPC supports. Just think of it as yet another assembler format.) You also need "opt" if you want to perform full o

Re: [fpc-devel] The 15k bounty: Optimizing executable speed for Linux x86 / LLVM

2018-10-27 Thread Martin Schreiber
On Saturday 27 October 2018 09:27:59 Sven Barth via fpc-devel wrote: > > > > Not really. The IR format has been pretty stable since version 3.9 or so > > (LLVM is current at version 8.) As far as dependencies, it would add none > > whatsoever other than a copy of the LLC or LLVM-AS binaries (as in,

Re: [fpc-devel] The 15k bounty: Optimizing executable speed for Linux x86 / LLVM

2018-10-27 Thread Sven Barth via fpc-devel
Ben Grasset schrieb am Sa., 27. Okt. 2018, 05:46: > On Thu, Oct 25, 2018 at 3:06 AM Sven Barth via fpc-devel < > fpc-devel@lists.freepascal.org> wrote: > >> Simon Kissel schrieb am Do., 25. Okt. >> 2018, 08:54: >> >>> - Complete the LLVM branch of FPC. It looks like Jonas has stopped >>> worki