Recent

Author Topic: FreePascal and Lazarus Optimization  (Read 2485 times)

ChrisR

  • Full Member
  • ***
  • Posts: 247
FreePascal and Lazarus Optimization
« on: November 15, 2020, 01:22:54 pm »
It is fantastic that FPC and Lazarus support the new ARM-based Macintosh on launch day. From my persecptive, Jonas (FPC) and Dmitry (Lazarus) have both led and been the public faces of this community effort. Like many of us, Jonas and Dmitry have full time jobs, and their ability to contribute to this community project is limited. In addition, there is still opportunity for optimization for FPC
  a. FPC for ARM can fail when when run at higher optimization levels (as documented on Mantis)
  b. FPC for ARM still has a lot of low-hanging fruit for hardware-specific optimizations.
  c. FPC lacks single assignment that would optimize performance on all platforms (https://wiki.freepascal.org/Single_assignment)

I want to highlight the work of J. Gareth "Kit" Moreton". He has an established track record for optimizing FreePascal as seen by his commit history on Mantis. His work has included x86-64, ARM and general optimization tricks. The entire community has benefited from his talent. Beyond his outstanding training, he has ability to think differently from most people. This helps him find solutions that are unintuitive to most:
  https://www.ft.com/content/583ad27a-38fd-11e8-b161-65936015ebc3
I can also speak personally about Kit’s skillset. He and I worked on SIMD acceleration for the open source MRIcroGL software. He developed SSE and AVX solutions to the primary bottleneck both for integer and floating-point computations. Objectively, his solutions far out-performed my own and I found it insightful to learn a few of his tricks. Indeed, his solutions were so good that the memory bandwidth rather than the computation is the rate limiting factor.

At the moment, Kit is between jobs. I believe that the whole community can benefit if we can help him devote his time to developing optimizations that will help all of us. The optimizations he creates improve the code each of us creates, and will be an enduring benefit for the community. During discussions, Kit has committed to tackling the 3 optimizations described above. Like most of us, he passionately wants to support the community regardless of our support. However, financial aid would give him the ability to focus on these issues and accelerate his progress.

I realize most of us have had financial setbacks and uncertainty due to COVID. This can impact our desire to contribute financially to the open source community. However, if you are able to make a small donation to Kit’s work, I will commit to matching your donation up to $200 per month (such that I will contribute $200 of my own money, if the rest of the community provides $200). Kit is truly a unique asset to our community, and his core compiler work impacts each of us. This is a terrific opportunity for the community to engage the full time efforts of a uniquely gifted developer
   https://www.patreon.com/curiouskit/posts
   
Several FPC/Lazarus developers are supported by Patreon, and most post in this forum with signatures that advertise their Patreon site. Kit works behind the scenes, making all of our code better and he tends to keep himself to himself. I have started this campaign because I believe this is a worthy cause. However, Kit has approved the content of this message.

ccrause

  • Hero Member
  • *****
  • Posts: 845
Re: FreePascal and Lazarus Optimization
« Reply #1 on: November 15, 2020, 06:26:32 pm »
I don't know Kit, however his ideas, experiments and contributions are great reads and suggest an organized and analytical mind.

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2020
  • Former Delphi 1-7, 10.2 user
Re: FreePascal and Lazarus Optimization
« Reply #2 on: November 16, 2020, 04:56:57 am »
I added a small amount to the cause.

AlexTP

  • Hero Member
  • *****
  • Posts: 2386
    • UVviewsoft
Re: FreePascal and Lazarus Optimization
« Reply #3 on: December 25, 2020, 09:05:42 am »
I subscribed+donated.

jwdietrich

  • Hero Member
  • *****
  • Posts: 1232
    • formatio reticularis
Re: FreePascal and Lazarus Optimization
« Reply #4 on: December 25, 2020, 11:42:17 am »
Thanks for sharing this information. I just subscribed and donated.

Promoting geniusses like J. Gareth Moreton would be an excellent case for the foundation (in addition to individual contributions, of course).
function GetRandomNumber: integer; // xkcd.com
begin
  GetRandomNumber := 4; // chosen by fair dice roll. Guaranteed to be random.
end;

http://www.formatio-reticularis.de

Lazarus 2.2.6 | FPC 3.2.2 | PPC, Intel, ARM | macOS, Windows, Linux

Igor Kokarev

  • Sr. Member
  • ****
  • Posts: 370
Re: FreePascal and Lazarus Optimization
« Reply #5 on: January 03, 2021, 10:15:19 pm »
I subscribed and donated.

Thanks to Jonas and skalogryz for their work!

 

TinyPortal © 2005-2018