Jump to content
chmichael

UltraCode64 for Delphi (aka 64-bit FastCode)

Recommended Posts

Hello Guys & Girls,

  Since i'm getting bored to wait from Embarcadero to speed up delphi i thought it would be nice for us ("the community") to help out the things a bit.

  So i started a new project on the GitHub which it will allow us to build the Fastest RTL is possible for Delphi.

 

  The targets are:

  CPU: PASCAL, SSE3, AVX, ARM

  Operating Systems: Windows, MacOS, Linux, iOS, Android

  GPU: OpenCL, Vulkan (Just an idea to use GPU to accelerate RTL)

  (Single & Parallel routines)

 

What do you think ? I hope anyone will start contribute and make Delphi Fastest Again!

 

Thank you

 

Github: https://github.com/chmichael/UltraCode64

 

Poll for 32 bit: http://www.easypolls.net/poll.html?p=5d24b2c8e4b02fae1dda847d

Edited by chmichael
  • Like 1
  • Thanks 2

Share this post


Link to post

Drop in placements of RTL and/or VCL routines would be most beneficial for most.

 

And maybe something as a bonus that are not in the Delphi as a standard.

 

Hope this project attracts lot of coders.

 

-Tee-

Share this post


Link to post

First step may be to write faster code in pure pascal, with the associated tests.

Then add some asm version, and see if it is actually faster.

There is already a lot of code in http://mormot.net SynCommons.pas which has faster alternatives than the Delphi version.

 

But two remarks:
1. I wouldn't stick to 64-bit - do why call it UltraCode64 ?
2. FPC compatibility could be very beneficial - as we did for mORMot.

  • Like 4

Share this post


Link to post
42 minutes ago, Arnaud Bouchez said:

I wouldn't stick to 64-bit - do why call it UltraCode64 ?

 

Strongly agreed, I still compile my programs as win32.

Share this post


Link to post
56 minutes ago, Arnaud Bouchez said:

> First step may be to write faster code in pure pascal, with the associated tests.

Well, we already have the Current RTL for benchmarking. I'll see what i can do tranfering the old FastCode pascal to this project

 

  • Like 1

Share this post


Link to post
2 hours ago, Arnaud Bouchez said:

1. I wouldn't stick to 64-bit - do why call it UltraCode64 ?

2. FPC compatibility could be very beneficial - as we did for mORMot.

All the currently platforms are 64 bit so i don't think there is much point wasting time for 32bit code. Anyhow it's up to developers to choose not me! Free Pascal compatibility will bo no problem also. 🙂

 

Also are the mORMot assembler routines 64 bit ?

 

ps:

I updated the first post with a Poll for 32-bit

Edited by chmichael

Share this post


Link to post

I just want to know how many people will spend time on this project so i can focus on the benchmark/validation tools for start. (Since i'm not an assembler expert) IOW, if nobody cares the project will die like the FastCode.

Edited by chmichael

Share this post


Link to post

Good idea. Indeed SynCommons already contains many highly optimized routines and there is not much sense to duplicate it. But I believe there is still much to do.

As of platforms - besides i386 and AMD64 there is ARM which is very interesting and much less covered with optimized code.

Share this post


Link to post
 
 
 
7 hours ago, chmichael said:

All the current platforms are 64 bit so I don't think there is much point wasting time for 32bit code. 

 

You might want to do a survey to confirm your speculation on how many developers are still on 32-bit vs 64-bit.  

I'd be surprised if even 25% of Delphi users are on 64-bit. 

  • Like 1

Share this post


Link to post
Quote

Doesn't look like there is any code in this repo. I'm confused.

I don't think he wants to implement ist himself. He's looking for voluntaries to do this. 

Quote

I just want to know how many people will spend time on this project so i can focus on the benchmark/validation tools for start. (Since i'm not an assembler expert)

 

  • Like 1

Share this post


Link to post

Poll is clear so i removed the "64" suffix from the repository.

If anyone wants to contribute code please let me know! (I'll move the old FastCode code for start)

 

Thank you

Edited by chmichael
  • Thanks 1

Share this post


Link to post
8 hours ago, Markus Kinzler said:

I don't think he wants to implement ist himself. He's looking for voluntaries to do this

Hmm. Seems like an odd way to go about it. Choosing to contribute to an open source project means making a commitment. I personally wouldn't want to do that without knowing that the project will have strong leadership and values.

 

Making a an empty box and asking people to throw stuff in it as they please isn't at all enticing. 

Share this post


Link to post
46 minutes ago, David Heffernan said:

Hmm. Seems like an odd way to go about it. Choosing to contribute to an open source project means making a commitment. I personally wouldn't want to do that without knowing that the project will have strong leadership and values.

 

Making a an empty box and asking people to throw stuff in it as they please isn't at all enticing. 

  Well i was on updating the FastCode "RTL replacement" then. Anyhow that is not my point, if you want to be the leader be my guest!

  My point is that all these years after FastCode nothing else is done and Microsoft has already made .Net Core open source. At least to me it's a start man to motivate your minds!
  I'll start to work moving the old FastCode code into this new project and on new Benchmark and Validation tools (on my free time), just follow the repository to see updates.

 

That's all i can do for now.

Thank you

 

 

  • Like 3
  • Thanks 1

Share this post


Link to post

I like the general idea, but mostly the ARM side I see as problematic.

Are there even ways in Delphi to embed ARM assemler code, I'm afraid not ?

Never checked how that can be possible, so the libraries probably have to be written with 3rd party tools.

Share this post


Link to post

I would consider this to be a Stone Soup. So with minor contributions from everyone, this could really be a great thing. It could of course also go the way quite a few open source projects have gone straight towards oblivion, but I tend to look at things positive. I would be happy to contribute "human readable" content such as installation instructions (something lacking in most other OS projects) and so forth.

  • Like 1

Share this post


Link to post

Hope all start to contribute.

  1. When the FastCode was alive and kicking I suggested some kind of online server where benchmark/validation app could post results. Now hosting such a thing would be way easier.
  2. This could be good new contribution, to start with https://github.com/davidberneda/FastDateTime  (Not my code, just to be clear)

-Tee-

 

Share this post


Link to post
On 7/9/2019 at 4:38 PM, chmichael said:

Well, we already have the Current RTL for benchmarking. I'll see what i can do tranfering the old FastCode pascal to this project

We need rather our own optimized pure pascal code.
The RTL did change between versions, so a reference fast pascal version is IMHO mandatory - I have seen pascal version faster than naive assembly.
It could be a very good benefit to install it to old Delphi versions too.

 

Also be aware that some FastCode pascal is not compatible with 64-bit, nor with FPC, since it targeted 32-bit Delphi only at that time.

 

And, as with FastCode, you will need to have a system to register benchmarks, on actual diverse computers.
A centralized DB would be better than some XLS files (as with FastCode): any dev could compile and run the code on its own HW, for a given Delphi version, then send it to the main DB.

Share this post


Link to post
On 7/9/2019 at 10:45 AM, chmichael said:

I just want to know how many people will spend time on this project so i can focus on the benchmark/validation tools for start. (Since i'm not an assembler expert) IOW, if nobody cares the project will die like the FastCode.

I have a plan to start with 64bit development in a few months, so I will definitely be available to contribute with testing, bench marking, if needed.

  • Like 1

Share this post


Link to post
5 hours ago, Tommi Prami said:
  1. When the FastCode was alive and kicking I suggested some kind of online server where benchmark/validation app could post results. Now hosting such a thing would be way easier.
  2. This could be good new contribution, to start with https://github.com/davidberneda/FastDateTime  (Not my code, just to be clear)

1. I already have this in my design plans but it seems i can not host a database on the Github so currently i'll have to use my personal hosting.

2. Thanks! I'll contact him after Benchmark/Validation apps are made.

Edited by chmichael
  • Like 1

Share this post


Link to post
3 hours ago, Arnaud Bouchez said:

Also be aware that some FastCode pascal is not compatible with 64-bit, nor with FPC, since it targeted 32-bit Delphi only at that time.

Yes, but I think that we have some FreePascal developers in here to sort this out.

 

3 hours ago, Arnaud Bouchez said:

And, as with FastCode, you will need to have a system to register benchmarks, on actual diverse computers.

A centralized DB would be better than some XLS files (as with FastCode): any dev could compile and run the code on its own HW, for a given Delphi version, then send it to the main DB.

See my answer to Tommi

Share this post


Link to post
Guest
On 7/11/2019 at 9:21 AM, Sherlock said:

I would consider this to be a Stone Soup.

OT warning: I have used the "scandinavian" expression all my live w/o knowing the story.

Thank you, it is necessary and humbling to be reminded that even developers like me (hrm) takes some things for granted without thinking. 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×