Jump to content

FredS

Members
  • Content Count

    418
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by FredS

  1. How come I always get homework when I come here 🙂 The code used was originally done to test a home rolled implementation of 'AddIfNotExists' in Berlin. In short that particular test won't do you any good. But here are the steps used: Turned OFF Overflow and Range checking in xxHash32 Changed the test from using the default Jenkins hash to use (that) xxHash32. This was done by copying the TDelegatedEqualityComparer used with Murmor3 and changing a single line: Result := Integer(TxxHash32.CalculateHash32(PChar(Value)^, Length(Value) * CharSize)); // Result := Murmor3(PChar(Value)^, Length(Value) * CharSize, 0); The test itself is based on a TDictionary<string,integer> where the string is a GUID appended with the for loop value. This was originally done since one version of Murmor had issues with collisions when the first part of the string was identical. That's it, as before: your mileage may vary..
  2. Four Million (Murmor3,PreAlloc): 03.021-4807 Four Million (xxHash,PreAlloc): 12.250-4320 Enough play time, if you can get xxHash32 to beat Murmor3 let me know 🙂
  3. Not installed. There is mention that xxHash32 is slower on x64, which is most likely the reason.. Equality Comparer in System.Generics.Defaults is limited to a 32bit hash..
  4. Just ran a TDictionary comparison using Murmor3 v TxxHash32.CalculateHash32: One Million (xxHash,PreAlloc): 01.446-8681 One Million (Murmor3,PreAlloc): 00.743-3334 Four Million (Murmor3): 04.895-7561 Four Million (Murmor3,PreAlloc): 03.130-7519 Four Million (xxHash,PreAlloc) : 04.491-7058 Your mileage may vary..
  5. FredS

    TTimer equivalent with smaller interval

    Calculating accurate 'Now' or maybe System.Diagnostics.TStopWatch
  6. FredS

    Windows DNS Server

    There is DnsModifyRecordsInSet in Domain Name System (DNS) windns.h contains the following programming interfaces:
  7. This treats TPassword like a string yet in Berlin+ you can add a unique Record Helper for TPassword. TPassword = type string; // Example of a Helper for TPassword TPasswordHelper = record helper for TPassword function CheckPwdComplexity(const MinPwdLen: Word; const Level: TPwdComplexity): boolean; function ContainsLower(const Required : Cardinal = 1): boolean; function ContainsSpecial(const Required : Cardinal = 1): boolean; function ContainsUpper(const Required : Cardinal = 1): boolean; function Secure(const ProtectWith: TSecureStringProtection = ssFast): ISecureString; function BCrypt: TBCrypt; inline; end;
  8. FredS

    Pre-select a Radiobutton in a TTaskDialog?

    Setting 'default' will select it.
  9. FredS

    What's the best common folder for...

    Stefan covered that under 'for the program itself ', don't clutter up Documents with stuff that isn't for the user's end use.. annoying 🙂
  10. FredS

    SHOpenFolderAndSelectItems 64-bit

    On Windows 10 1903.18362.476. Also your code doesn't `CoUninitialize` if IIDL is nil. ..and what does GetLastError say when you get IIDL=nil?
  11. FredS

    SHOpenFolderAndSelectItems 64-bit

    shell32 is declared in Winapi.ShlObj in the implementation section. const shell32 = 'shell32.dll'; You in Berlin or UP, or something else? You know asking Qs without supplying sufficient information simply leads to what you see here..
  12. FredS

    SHOpenFolderAndSelectItems 64-bit

    Works fine in Berlin+ Win64..
  13. FredS

    SHOpenFolderAndSelectItems 64-bit

    Defined in Winapi.ShlObj.
  14. With include files one can change the inline option and skip all those IFNDEFs, tested with Berlin and up. In this case the include file includes a CustomInclude.inc, which is part of the project. This makes it simple to edit in the IDE as required. /// <remarks> /// NOTE: You can override this in CustomInclude.inc, but it requires a Build /// and won't update the Blue Dots /// </remarks> {$IFNDEF RELEASE} {-$INLINE OFF} // un-comment as needed {$ENDIF RELEASE}
  15. FredS

    Closing an external App.

    You're banking on no other form using 'TMainForm' as a class name on the system? I'd use Process Info instead, quick search gave me this: https://stackoverflow.com/questions/2616279/how-can-i-get-other-processes-information-with-delphi
  16. Yup, or for readability (10+ years later) add it as a last parameter with a default value.
  17. FredS

    Windows product ID (from the registry)...

    Works here.. but that code should only run if 'IsWin8'
  18. FredS

    Windows product ID (from the registry)...

    The line with 'isWin8' is required and correct and the line following with 'data[66]' should only be executed if isWin8=true.
  19. FredS

    GExperts and virus scanners

    Sure doesn't increases my confidence, what about False Negatives.. 🙂
  20. FredS

    Debugger in 10.3.3 is useless :'(

    Changed that option then used Notepad++ to generate 4 lines with LF only, pasted into 10.3.3, saved and opened the file in Notepad++, LF still terminates two of the line endings. File another bug report? 🙂
  21. FredS

    RAD Studio 10.3.3 now available

    I read that as 'why can't Andreas fix all their bugs' 🙂
  22. FredS

    Debugger in 10.3.3 is useless :'(

    Or don't install EMB anything 'till your daily backup ran then recovery is a click away 🙂
  23. FredS

    Delphi 10.3.3 CE IDE issues

    10.3.3 breaks display when I RDP into the VM .. again (10.3.1 had this issue). So badly that its not usable without IDE Fix Pack 6.4.4.
  24. Default Align setting does that already. With that default (A+) the only way to get fields that do not conform is by by packing a record.
  25. @Pawel Piotrowski Yes, but you launch 20 threads. My point was about a single write single read thread. But regardless my test also fails when increased to 10 million with single steps..
×