Recent

Author Topic: Bounties to speed up FPC  (Read 3843 times)

Seenkao

  • Hero Member
  • *****
  • Posts: 674
    • New ZenGL.
Re: Bounties to speed up FPC
« Reply #30 on: February 02, 2025, 06:03:19 pm »
Я могу написать код, который должен будет выводится на ассемблере и могу постараться оптимизировать его.
Но я не писал компиляторы, я даже не представляю как вы будете код Паскаля заменять на тот код что я смогу вам предоставить. Если вам без разницы, какой код, главно чтоб он был оптимизирован, то я могу попробовать сделать.


Google translate:
I can write code that should be output in assembler and I can try to optimize it. But I didn't write compilers, I can't even imagine how you will replace Pascal code with the code that I can provide you. If you don't care what code, the main thing is that it is optimized, then I can try to do it.
Rus: Стремлюсь к созданию минимальных и достаточно быстрых приложений.

Eng: I strive to create applications that are minimal and reasonably fast.
Working on ZenGL

Okoba

  • Hero Member
  • *****
  • Posts: 616
Re: Bounties to speed up FPC
« Reply #31 on: February 02, 2025, 06:39:13 pm »
@Seenkao the tasks are about optimizing the output of FPC.

Thaddy

  • Hero Member
  • *****
  • Posts: 16656
  • Kallstadt seems a good place to evict Trump to.
Re: Bounties to speed up FPC
« Reply #32 on: February 02, 2025, 06:45:00 pm »
@Seenkao the tasks are about optimizing the output of FPC.
For a specific cpu, because on arm it already does not need such micro optimizations that you ask for.
It is highly debatable, since there are already too many assembler optimizations on the i386 and x86_64 platforms to take the compiler serious for that platform.

You should ask for pure pascal.
But I am sure they don't want the Trumps back...

ALLIGATOR

  • Full Member
  • ***
  • Posts: 136
Re: Bounties to speed up FPC
« Reply #33 on: February 02, 2025, 07:15:59 pm »
arm it already does not need such micro optimizations that you ask for.
Explain in more detail what you're talking about

already too many assembler optimizations on the i386 and x86_64 platforms to take the compiler serious for that platform.
Yeah, it's not bad compared to what it once was before, but there's still plenty of room for improvement (or are you against improvements? Huh?)

You should ask for pure pascal.
What?

Seenkao

  • Hero Member
  • *****
  • Posts: 674
    • New ZenGL.
Re: Bounties to speed up FPC
« Reply #34 on: February 02, 2025, 08:15:45 pm »
@Seenkao the tasks are about optimizing the output of FPC.
Это не даёт ни какого понимания чего вы хотите.

Если вы хотите чтоб написали оптимизатор подобных реализаций используя FPC, то просто не используйте данные решения, которые вы предоставили.
Если более глобально рассматривать, то просто разверните циклы. Если вам нужны не такие значения которые вы писали изначально и разворачивание циклов будет достаточно сложным, то тут нужны будут алгоритмы, которые будут учитывать количество приходящих циклов и оптимизировать в зависимости от этого (это кстати очень древние оптимизации, написаны они наверно ещё в прошлом веке).

Если же вы хотите, чтоб компилятор делал необходимые оптимизации, то думаю стоит обратиться к разработчикам FPC, а не как не ко всему форуму. Я могу показать как должен выглядеть конечный ассемблерный код, а разработчики FPC могут его применить, по необходимости и если он им подойдёт.

Gogle translate:
This does not give any understanding of what you want.

If you want to write an optimizer for such implementations using FPC, then simply do not use the solutions you provided.
If you consider it more globally, then simply unroll the cycles. If you do not need the values ​​that you wrote initially and unrolling the cycles will be quite complex, then you will need algorithms that will take into account the number of incoming cycles and optimize depending on this (by the way, these are very ancient optimizations, they were probably written in the last century).

If you want the compiler to make the necessary optimizations, then I think it is worth contacting the FPC developers, and not the entire forum. I can show what the final assembler code should look like, and the FPC developers can use it, if necessary and if it suits them.

For a specific cpu, because on arm it already does not need such micro optimizations that you ask for.
It is highly debatable, since there are already too many assembler optimizations on the i386 and x86_64 platforms to take the compiler serious for that platform.

You should ask for pure pascal.
Не надо вводить в заблуждение людей. Я специально писал fast_StrToInt, чтобы показать что оптимизировать можно многие задачи. Я так же написал fast_StrToInt на ассемблере (посмотреть можно здесь), и я могу с большой уверенностью сказать что ассемблерная версия для процессоров ARM работает быстрее, чем моя же Паскалевская версия (а моя Паскалевская версия, в большинстве случаев работает быстрее, чем стандартная версия).

Оптимизация нужна везде. Просто нужно помнить, что многое оптимизировали уже до нас, а в особенности циклы.

Google translate:
Don't mislead people. I specifically wrote fast_StrToInt to show that many tasks can be optimized. I also wrote fast_StrToInt in assembler (you can see it here), and I can say with great confidence that the assembler version for ARM processors works faster than my Pascal version (and my Pascal version, in most cases, works faster than the standard version).

Optimization is needed everywhere. You just need to remember that many things have already been optimized before us, especially cycles.

------------------------------------------------------------------
I apologize if you thought I was being rude. I use a translator, I don't know English well yet.
Rus: Стремлюсь к созданию минимальных и достаточно быстрых приложений.

Eng: I strive to create applications that are minimal and reasonably fast.
Working on ZenGL

d2010

  • Full Member
  • ***
  • Posts: 122
Re: Bounties to speed up FPC
« Reply #35 on: February 05, 2025, 05:05:14 pm »
Okai, you optimize many variabile-optimization of Integers, Cardinal. Word.
One big problems in Lazarus or Delphi, are TForm, and Tobjects.
These types, have good speed?

ALLIGATOR

  • Full Member
  • ***
  • Posts: 136
Re: Bounties to speed up FPC
« Reply #36 on: February 05, 2025, 05:07:17 pm »
These types, have good speed?
What are you comparing it to?  :D
« Last Edit: February 05, 2025, 05:09:29 pm by ALLIGATOR »

d2010

  • Full Member
  • ***
  • Posts: 122
Re: Bounties to speed up FPC
« Reply #37 on: February 28, 2025, 08:26:50 am »
Can you search on internet ...?
Already I have my source of my routine.pas?
How to other multiple-versions  of my routine in main.pas?
Is kind  to hard.


ALLIGATOR

  • Full Member
  • ***
  • Posts: 136
Re: Bounties to speed up FPC
« Reply #38 on: February 28, 2025, 08:59:25 am »
🙄

Khrys

  • Full Member
  • ***
  • Posts: 177
Re: Bounties to speed up FPC
« Reply #39 on: March 03, 2025, 07:20:28 am »
Can you search on internet ...?
Already I have my source of my routine.pas?
How to other multiple-versions  of my routine in main.pas?
Is kind  to hard.

What language is this? It certainly isn't English  %)

Fred vS

  • Hero Member
  • *****
  • Posts: 3505
    • StrumPract is the musicians best friend
« Last Edit: March 03, 2025, 10:33:12 am by Fred vS »
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

Okoba

  • Hero Member
  • *****
  • Posts: 616
Re: Bounties to speed up FPC
« Reply #41 on: March 05, 2025, 10:25:24 am »
Thank you Fred, but I want the native backend, as I want to encourage speeding it up.

mika

  • Full Member
  • ***
  • Posts: 119
Re: Bounties to speed up FPC
« Reply #42 on: March 05, 2025, 12:09:58 pm »
Okai, you optimize many variabile-optimization of Integers, Cardinal. Word.
One big problems in Lazarus or Delphi, are TForm, and Tobjects.
These types, have good speed?

TForm and Tobjects are classes thus not covered by this topic.
In essence TForm and Tobjects are pointers to "record" in heap. Speed is just fine for accessing fields.

Okoba

  • Hero Member
  • *****
  • Posts: 616
Re: Bounties to speed up FPC
« Reply #43 on: March 08, 2025, 04:37:01 pm »
I can not create an account on the Wiki. Can anyone with access update this page: https://wiki.lazarus.freepascal.org/Bounties

 

TinyPortal © 2005-2018