Jump to content

Mike Torrettinni

Members
  • Content Count

    1509
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by Mike Torrettinni

  1. Oh, didn't know about this. But results are pretty much the same for me, even thought I put all the calls and vars in procedure. Did you make any other changes? Because your TDict results are very good, but I still get same results. Oh, perhaps is Delphi version, I use 10.2.3.
  2. Here is benchmark code, but have in mind it might be a bit complicated because it is a start of my testing a common table lookup implementation (see posts above): https://pastebin.com/itBRv76X TSynDictionary (SynCommons.pas): https://github.com/synopse/mORMot
  3. I finally realized why binary search by ID (integer) was slower than by Name (string): because function by ID was returning a Name (string). If I return data index or pointer, the speed is same. Everyday learning something new.
  4. Mike Torrettinni

    How to compare performance between Delphi versions?

    Aha, now I get it! And since we can't mix 32 and 64, I should create both versions. Thanks!
  5. Mike Torrettinni

    How to compare performance between Delphi versions?

    Can you please expand on this? I have only basic experience with dlls.
  6. Mike Torrettinni

    How to compare performance between Delphi versions?

    Thanks, was just thinking about this. But why do you suggest dll, just exe would work, right?
  7. Mike Torrettinni

    How to compare performance between Delphi versions?

    This is interesting, since I'm still on 10.2 so the difference could be even bigger. Any example showing a difference in performance would be great!
  8. Mike Torrettinni

    How to compare performance between Delphi versions?

    At the time, this was too complicated for me to handle.
  9. Mike Torrettinni

    How to compare performance between Delphi versions?

    Yes, but if you need 2 different dll versions for different project, you need register and un-register each time you use different project.
  10. Mike Torrettinni

    How to compare performance between Delphi versions?

    Skipping 10.3 and 10.4 due to some code wasn't ready for migration at the time. When I saw bug fix list for 10.4.2 I was planning to upgrade, but then I decided to wait for next major release.
  11. Mike Torrettinni

    How to compare performance between Delphi versions?

    @emailx45 Not sure if you saw all the topics with 10.4.2 issues in last 2 weeks on this forum, just use search. I will skip it. @David Hoyle I remember Eurekalog was one of the issues, I think because I couldn't customize installation folders. Also activex dll which needs to be registered - I needed to register different dll version each time I switched projects. Annoying, but like I said, I probably didn't spend enough time resolving these issues. The 3rd party source that doesn't need to be installed was OK, like you said in different folders.
  12. Mike Torrettinni

    How to compare performance between Delphi versions?

    I had some issues with 3rd party code, when I had 2 versions installed. I remember registered activex control was causing some issues, too. Perhaps I need to spend more time solving these issue when 10.5 is out. It would be nice to have 2 versions installed side by side, for a couple of days at least, to check performance.
  13. To avoid Delphi's string protection that can be slow when performance is needed, but string change is rarely actually changed. See more here: https://www.delphitools.info/2009/05/06/code-optimization-go-for-the-jugular/ What Delphi version are you talking about, what faster function?
  14. I re-ran with TSynDictionary to verify again, and it's much faster versus TDictionary for string searches, not so much for integers. But seems to be pretty much same performance in 32bit and 64 bit! 32bit: 64bit:
  15. Thanks for the tip! In next few weeks I will start benchmarking 64bit in my project and see how it goes. But just this simple test showed I have these little slow pieces all over the project, so not neccessarily a stand-out bottleneck, but definitely a refactoring and faster implementation is needed in a lot of places. Will see how 64bit behaves.
  16. Thanks, but since max records is 10K and rare, I think I can skip this for now, but perhaps in the future.
  17. Is this same, similar as Trie (https://en.wikipedia.org/wiki/Trie)? Something might come useful down the line, but right now probably overkill.
  18. Hm, you are right, some are 1-n in range, some are random. Perhaps I can have a flag that will determine if access is direct or by search mechanism (TDictionary or bin array). Well, 2.5x slower (5x was exaggeration) , when run as 64bit, while the rest is still acceptable:
  19. My data is simple in 99% cases: ID = integer, full range 1.. MaxInt (but I guess that doesn't matter), string= 12-30 characters. In majority cases it's populated at start, sorted once and then just used for accessing by ID, Name, single random lookup - I mean no lookups in sequence. I guess. Currently looking for general fast implementation. The biggest data tables, 1K-10K records are not accessed often, but I still want to implement faster access - because sequential access by string gets crazy slower in 64bit - 5x! That's why I'm looking for ready made solution. I tried to implement search by integer, a copy of TGpStrinhHash, and it got so complicated I made a mess. Like you said, I don't want to use something that can have bugs, for a few percentage. Not in this case.
  20. Mike Torrettinni

    Idera acquires PreEmptive

    Thanks @Kas Ob. , the whole enterprise 'call us for pricing' had me thinking if it could be something more than the simple things that have been around for ages, the obfuscation and others like you say.
  21. Mike Torrettinni

    Idera acquires PreEmptive

    Are you familiar with PreEmptive solutions? Perhaps they will offer similar protective solutions for Delphi. Even though I can't imagine how it works and I never needed anything as such, but perhaps something new and useful can be made.
  22. Mike Torrettinni

    Several F2084 Internal Error on Delphi 10.4.2

    I just had similar issue compiling for 64bit Windows and it was due to inline keyword after function declaration, which compiled OK for 32bit. So, if you have small example you can maybe find the cause, but with large code base it good take you good time to chase down the cause, if you ever find it.
  23. Mike Torrettinni

    I will be less active for a few weeks

    @Lars Fosdal Not sure which phone and android version you have, but voice to text has come along way and is pretty good. No reason to be absent 😉 I hope your arm heals fast!
  24. I'm interested how you guys identify bottlenecks in your source code. When I profile my code, I usually try to optimize anything that could reduce execution time by least 10%+. It also depends what I see that can be optimized or is very clearly badly designed. Sometimes I think I can improve it and it ends up even worse 😉 When do you decide you will try to optimize certain parts of the code? How you define bottlenecks, is it the expected percentage of improvement (5,10, 50%...)? Do you ever optimize something that is not a bottleneck, but a customer/user is requesting performance improvements?
×