Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 01/15/21 in Posts

  1. Making it available to everyone who want a thread safe, asynchronous, cross-platform and simplistic messaging system for communication between classes / layers in delphi applications. https://github.com/viniciusfbb/ipub-messaging
  2. Get the most out of your GPU by writing custom shaders for FireMonkey! https://blog.grijjy.com/2021/01/14/shader-programming/
  3. https://mega.nz/file/qQlnXIYK#MTbOfXxBrCT_2KF8MhTwqCwR8Ewbj5PdwcaS4aHu6ME Delphi's FMX header unit, platform binaries, detailed guide with demo for BASS audio library (No add-on). Hope to have contributed. BASS rocks!
  4. hello dear Delphinius Delphi 64 bit compiler RTL speedup Strong performance speedup for multithreaded server apps Deflate compression 5x faster than gzlib for WebBroker apps, brings your client-server experience up to the stars I'll update sometime. Regards.
  5. As already stated in a different thread I have adapted the TimSort implementation for FreePascal I found on github to compile with Delphi 2007 (and probably earlier, but I haven't tried it). The source code is licensed under the Apache License 2.0 and available in my dzlib on OSDN. Note that this currently only sorts an array of integer and is still pretty rough. I'm going to refine quite a bit. There seem to be only 2 (now 2.5 😉 ) TimSort implementations in Pascal / Delphi available. (According to @David Heffernan there is also one in Spring4d.), but none that does not require generics.
  6. Remy Lebeau

    How to .Free a non-modal form?

    No. You have to reset it manually. Unless the parent form needs to reset its FNonModalForm variable, in which case you would need to move the OnClose handler to the parent form instead, eg: procedure TForm1.Button1Click(Sender: TObject); begin if FNonModalForm = nil then begin FNonModalForm := TForm2.Create(Self); FNonModalForm.OnClose := NonModalFormClosed; end; FNonModalForm.Show; end; procedure TForm1.NonModalFormClosed(Sender: TObject; var Action; TCloseAction); begin FNonModalForm := nil; Action := caFree; end;
  7. Attila Kovacs

    How to .Free a non-modal form?

    in OnClose Action := caFree;
  8. Attila Kovacs

    Cross-platform messaging system

    @Andrea Raimondi At first sight this hocus-pocus has not much to do with System.Messaging at all and could be be easily create the same with this lib. By the way, what do you mean with Are you writing message driven apps? By the way 2 initialization begin MsgMgr := TMessageManager.DefaultManager; end; What is your purpose with begin/end? Is this also some readability thing?
  9. Here are some timings: sorted reverse half random QuicksortInteger(1000000): 0.05787 0.06269 not done 0.16328 QuickSortPlusInteger(15)(1000000): 0.04744 0.04995 0.24928 0.14548 TimSortInteger(1000000): 0.00214 0.00252 0.00981 0.16411 QuicksortString(1000000): 1.36692 1.00144 not done 1.16640 QuickSortPlusString(15)(1000000): 1.38534 0.99298 0.81605 1.23809 TimSortString(1000000): 0.06285 0.09036 0.16268 1.86726 Sorting 1 million integers or strings respectively. The strings are simply generated with IntToStr for numbers 0 to 999,999 and compared with CompareStr. This means that Sorted, Reverse and half for strings is not really correct, because '10' < '2' etc. I need to fix that, but this is not too bad a dataset for sorting tests either. (I just googled and found that apparently there are some test datasets for sorting algorithm performance. I'll have a look into that.) The numbers are the time in seconds for a single run on my computer. As you can see, TimSort is faster than all of them with the exception of random data, where it is still in the same ballpark. The test program is in the subdirectory Tests\SortingTests. Please note that with the exception of TimSort, these sorting algoritmms are not implemented for best performance but for convenience: They are abstracted from the data and use callbacks to compare and swap items. TimSort currently works directly on the data and uses a callback only for comparison, but my goal is to abstract the algorithm from the data in a similar manner, if possible.
  10. Anders Melander

    Cross-platform messaging system

    How is that relevant to the topic?
  11. My implementation now uses Pseudo Templates based on include files (please note that the linked article is ancient, so take its C++ references with a grain of salt), so it should be compatible with most Delphi versions (tested with Delphi 2007 and 10.2). The source is on OSDN in my dzlib. It has been tested with sorting dynamic arrays of integers and strings, but should work with anything else that does not include reference counting (so no interfaces yet). It's much slower for strings because of the special code in the MoveItems method which allows for reference counting (for strings, should also ). Unit tests are in the UnitTests\SortingTest subdirectory of dzlib. The units declaring TimSort for Integer and String arrays use the above mentioned template. To get the source, use SubVersion to create a working copy from http://svn.osdn.net/svnroot/dzlib-tools/dzlib/trunk
  12. Arnaud Bouchez

    Delphi 64bit compiler RTL speedup

    The 3rd party dll are Intel TBB if I am correct. So you should at least mention it, with the proper licence terms, and provide a link. About memory management, from my tests the Intel TBB MM is indeed fast, but eats all memory, so it is not usable for any serious server-side software, running a long time. Some numbers, tested on FPC/Linux, but you got the idea: - FPC default heap 500000 interning 8 KB in 77.34ms i.e. 6,464,959/s, aver. 0us, 98.6 MB/s 500000 direct 7.6 MB in 100.73ms i.e. 4,963,518/s, aver. 0us, 75.7 MB/s - glibc 2.23 500000 interning 8 KB in 76.06ms i.e. 6,573,152/s, aver. 0us, 100.2 MB/s 500000 direct 7.6 MB in 36.64ms i.e. 13,645,915/s, aver. 0us, 208.2 MB/s - jemalloc 3.6 500000 interning 8 KB in 78.60ms i.e. 6,361,323/s, aver. 0us, 97 MB/s 500000 direct 7.6 MB in 58.08ms i.e. 8,608,667/s, aver. 0us, 131.3 MB/s - Intel TBB 4.4 500000 interning 8 KB in 61.96ms i.e. 8,068,810/s, aver. 0us, 123.1 MB/s 500000 direct 7.6 MB in 36.46ms i.e. 13,711,402/s, aver. 0us, 209.2 MB/s for multi-threaded process, we observed best scaling with TBB on this system BUT memory consumption raised to 60 more space (gblic=2.6GB vs TBB=170GB)! -> so for serious server work, glibc (FPC_SYNCMEM) sounds the best candidate
  13. Eh? Imagine how people who pay would feel if I start giving it away Anyway, if this would be bread and you would be hungry, I'd give you a loaf without thinking twice, but it's not. As much as I'd like to think it is, this book is not really something you can't live without, so... Sorry... And about hugs... My husband expressed his wish to have a private chat with you... you'd better lay low for a while
  14. To avoid reusable hash, one could to use the "challenge" protocol: 1) The client send a request to the server to get a "challenge" (For example a random string). 2) The client send a 2nd request having the password combined with challenge hashed together 3) The server check the hash he received from the client by comparing it with the hash he has computed using the know password, the known challenge and known way to combine them. 4) The server when creating a challenge give it a very short live time and cancel it when the hash is received. With that two steps procedure, the hacker capturing traffic can grab the challenge and the hash. The hash is usable only once and won't help for future connections. The hacker has to do reverse engineering either the client or the server to discover how the challenge and password are combined before computing the hash, an discover which kind of hash has been used. This reverse engineering requires to have access to the computer to get a copy of the software. Should be must more complex than "simply" capturing traffic with a sniffer.
×