Jump to content
RDP1974

updated Delphi64RTL intel ipp onetbb

Recommended Posts

hi,

I have updated the libraries and units of the RTL patches from Intel IPP oneTBB performance suite

these are well suited for web server application scalability on windows architecture

 

https://github.com/RDP1974

(test on concurrent http calls show 13x speedup)

 

there are enhancements on zlib 1.3.1 options, and some random av seems solved correctly

 

I have done testing, but please if you found troubles please notify me at roberto.dellapasqua dot live.com

kind regards

Roberto

  • Thanks 1

Share this post


Link to post

Certainly looks interesting, but you are asking people to trust the dll's for which no source is provided? How were these dll's compiled? It's one thing to provide binaries from a trusted source (for example intel) but to provide self compiled unsigned dll's - with todays supply chain attacks etc - not going to fly.

  • Like 2

Share this post


Link to post

I don't see the source to any of the dll's in those repos. I get that you are using those projects to build the dll's, but the fact remains that they are black boxes - I cannot tell exactly what they do, what their provenance is and whether I can trust them. I'm not trying to dismiss your work as invalid, just pointing out that and open source project distributing dll's need to provide a way for them to be built, or they must come from a trusted source (and usually code signed).    

Share this post


Link to post

ok, I will publish a tutorial how to build the dll's

 

 

 

  • Like 1

Share this post


Link to post
Posted (edited)

ippMove is not much faster than System.Move in Delphi 12. In fact, it performs noticeably worse on small sizes (below 1k) and for some reason completely falls off the cliff on sizes that are >20k running 2-4 times slower.

Edited by Stefan Glienke
  • Like 2

Share this post


Link to post
Posted (edited)

maybe in rdpsimd64 can we rem this line?

which cpu do you test?

 

procedure Move2(const Source; var Dest; Count: NativeInt); inline;
begin
  //if Count > 0 then //>>> useless checking?
    SeaMove(@Source, @Dest, Count);
end;

 

I removed the check, works ok, thanks for the hint

Edited by RDP1974

Share this post


Link to post
On 8/9/2024 at 9:31 AM, Vincent Parrett said:

I don't see the source to any of the dll's in those repos. I get that you are using those projects to build the dll's, but the fact remains that they are black boxes - I cannot tell exactly what they do, what their provenance is and whether I can trust them. I'm not trying to dismiss your work as invalid, just pointing out that and open source project distributing dll's need to provide a way for them to be built, or they must come from a trusted source (and usually code signed).    

This point has been raised many times previously fwiw

Share this post


Link to post

look, I did only pascal wrappers, here's how to obtain the dll's:

 

install visual studio c++ (I use the 2019 version)

install intel ipp https://www.intel.com/content/www/us/en/developer/tools/oneapi/ipp.html

install python

 

the allocator is here:

https://www.oneapi.io/

https://github.com/oneapi-src/oneTBB/tree/master

see cmake dir, run it and build a visual studio project, locate tbbmalloc and compile it (you should select MD multithreading static library)

 

the simd rtl replacement:

install qt5 python library, if I remember "pip install pyqt5"
python C:\Program Files (x86)\Intel\oneAPI\ipp\latest\opt\ipp\tools\custom_library_tool_python\main.py

this tool will build a vc script to create the custom dll
locate ippsZero_8u, ippsCopy_8u, ippsMove_8u, ippsSet_8u, ippsFind_8u, ippsCompare_8u, ippsUppercaseLatin_8u_I, ippsReplaceC_8u from signal processing, and other select

(indeed we can extend many functions from this tool, especially for image processing, but I didn't have time to do)

run the script to obtain the dll

 

the zlib accelerated with ipp:

C:\Program Files (x86)\Intel\oneAPI\ipp\2021.12\share\doc\ipp\components_and_examples_win\components\interfaces

here you can see common libraries enhanced, check the folder zlib and open the readme, follow the instructions

 

tell me if you have troubles in build this

kind regards

 

Share this post


Link to post
Posted (edited)
On 8/10/2024 at 10:54 AM, RDP1974 said:

maybe in rdpsimd64 can we rem this line?

which cpu do you test?

 

procedure Move2(const Source; var Dest; Count: NativeInt); inline;
begin
  //if Count > 0 then //>>> useless checking?
    SeaMove(@Source, @Dest, Count);
end;

 

I removed the check, works ok, thanks for the hint

You *must not* remove that line - Move in Delphi allowed to be called with negative Count (a possible result of some size calculation), resulting in a no-op in the System implementation. Passing a negative number to most C++ implementations will result in passing a value >2mio because their size parameter is unsigned.

Also, the performance difference is hardly about that little check but the ippsMove_8u implementation.

Edited by Stefan Glienke
  • Like 1

Share this post


Link to post
55 minutes ago, Stefan Glienke said:

You *must not* remove that line - Move in Delphi allowed to be called with negative Count (a possible result of some size calculation), resulting in a no-op in the System implementation. Passing a negative number to most C++ implementations will result in passing a value >2mio because their size parameter is unsigned.

Also, the performance difference is hardly about that little check but the ippsMove_8u implementation.

thanks for the hint

I correct

Share this post


Link to post
1 hour ago, Stefan Glienke said:

Also, the performance difference is hardly about that little check but the ippsMove_8u implementation.

I mean, come on, how could that test be relevant!

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

×