Jump to content


Popular Content

Showing content with the highest reputation on 03/21/22 in all areas

  1. Stefan Glienke

    Micro optimization: IN vs OR vs CASE

    I am usually happy to help people improve in that subject but seeing that you simply ignored half the advice given to you before in countless similar threads I consider this a waste of time.
  2. Attila Kovacs

    TNetEncoding.URL.Decode question

    it's double encoded "=" = "%3D" "%3D" = "%253D"
  3. Rubicon v4.072 for Delphi is available now. This is a free upgrade for existing customers. There is a Free Lite version available for Delphi 10 and Delphi 11; download from https://www.href.com/rbcdnload. I am still looking for a couple more people to give new-user feedback. Just fill in the fairly short survey on this page, https://www.href.com/rubicon, and you will receive a significant discount to the pro version with full source. Since February, Rubicon has its own Discourse home located at https://forum.href.com/c/rubicon-full-text-search-for-delphi/5 If you would like to talk directly with other Delphi developers who have used Rubicon, please feel free to stop by. Ann Lynnworth Co-Founder and Bottle Washer HREF Tools Corp.
  4. New job opportunity if you are experienced. Prefered location is Kokkola Finland but remote work is accepted. https://attracs.teamtailor.com/jobs/1660578-delphi-developer/45cf12cb-1f96-4e93-94c1-8b96c6a45ade
  5. lol, small little squiggles, only looked at LUserID, sorry.. 🙂 yeah, input is wrong, should match the encoded, no?? just one more decode and you got it.. or maybe hunt down extra encode..
  6. dummzeuch

    INI problem

    That depends. Our internal programs all do that. They aren't installed under program files, though.
  7. Stefan Glienke

    Micro optimization: IN vs OR vs CASE

    The point that others already have expressed is that despite being interested in a topic as performance improvement so low level (as in instruction-level instead of algorithmic level) you seem to lack some important knowledge to do so such as assembly - it does not require as much as it does to write assembly code but to understand it in order to be able to look at the code in the debugger and see that some comparisons are apples and bananas. I did not even read through your code but simply placed a breakpoint into your IsIN function and noticed that it contained a function call to System.SetElem (that even was the first time I have ever seen that function being called so a TIL for me). Why was that the case? Because you are not using consts here but variables. Had you simply made consts for all those IDs the code would have almost as fast as the IsOR which does not suffer to extra function calls but from memory reads (not noticeable in the benchmark because its all in L1 cache already). On my CPU InOR is still a little faster than IsIN which is due to the fact how the compiler builds the in - you can see that for yourself in the disassembly and then look at instruction timings, read up on macro-operation fusion and data dependency For reference, this is the assembly for the two functions when using consts Project1.dpr.40: Result := aID in [xControlsRec.ButtonID, xControlsRec.FormID, xControlsRec.ListBoxID, xControlsRec.TabControlID, xControlsRec.ComboBoxID]; 004CEE7C 83E802 sub eax,$02 004CEE7F 7417 jz $004cee98 004CEE81 83E802 sub eax,$02 004CEE84 7412 jz $004cee98 004CEE86 83E802 sub eax,$02 004CEE89 740D jz $004cee98 004CEE8B 83E802 sub eax,$02 004CEE8E 7408 jz $004cee98 004CEE90 83E802 sub eax,$02 004CEE93 7403 jz $004cee98 004CEE95 33C0 xor eax,eax 004CEE97 C3 ret 004CEE98 B001 mov al,$01 Project1.dpr.41: end; 004CEE9A C3 ret 004CEE9B 90 nop Project1.dpr.45: Result := (aID = xControlsRec.ButtonID) or (aID = xControlsRec.FormID) or (aID = xControlsRec.ListBoxID) or (aID = xControlsRec.TabControlID) or (aID = xControlsRec.ComboBoxID); 004CEE9C 83F802 cmp eax,$02 004CEE9F 7417 jz $004ceeb8 004CEEA1 83F804 cmp eax,$04 004CEEA4 7412 jz $004ceeb8 004CEEA6 83F806 cmp eax,$06 004CEEA9 740D jz $004ceeb8 004CEEAB 83F808 cmp eax,$08 004CEEAE 7408 jz $004ceeb8 004CEEB0 83F80A cmp eax,$0a 004CEEB3 7403 jz $004ceeb8 004CEEB5 33C0 xor eax,eax 004CEEB7 C3 ret 004CEEB8 B001 mov al,$01 Project1.dpr.46: end; 004CEEBA C3 ret Depending on the number of IDs you have it might be worth using power of two and bitmasks or an enum directly because that would only require one cmp/test making the function twice as fast and perfect for inlining which would then also eliminate the function call overhead at all.
  8. Darian Miller

    Delphi Icons with Version Info

    FWIW, this is a batch file I use for forcibly refreshing the icon cache without rebooting taskkill /f /im explorer.exe cd /d %userprofile%\AppData\Local del IconCache.db /a start explorer.exe
  9. David Heffernan

    New Delphi job opportunity

    You will only consider graduates with computing degrees? Seems like that would rule out a lot of good candidates.
  10. DJof SD

    docwiki.embarcadero.com is not working

    I have projects which were started under Tokyo. Some day I'll migrate those 11.x but for the time being, I continue to use that older editions of RS.
  11. Uwe Raabe

    Delphi 11.1 is available

    The background setting is theme agnostic. There are at least three Background_XXX entries in the Welcome Page subkey of the BDS\22.0 registry key. The problem with the settings dialog is that it only saves the changes for the selected (in that dialog) theme. Unsaved changes to previously selected themes are simply forgotten. There is a QP entry for that: Welcome Page background image does not always save changes
  12. Anders Melander

    Delphi 11.1 IDE - Control + Click doesn't open FireDAC units

    Doesn't the trial come with full source... Asking for a friend 🙂
  13. Uwe Raabe

    Strange Benchmark Results; Am I Missing Something?

    Strange. I can confirm what @Dalija Prasnikar reported about a 50% reduction in a comment above. For Win32 changing num from Int64 to Integer reduces the time from 5.8 seconds down to 3.5 seconds. For Win64 the runtime for Int64 is way higher (10.4 seconds) than for Win32 (5.8 seconds), but reduces to a slightly better value for num being Integer: 3.4 seconds.
  14. Uwe Raabe

    Strange Benchmark Results; Am I Missing Something?

    Speaking about algorithms: const cnt = 1000000000; var total: Int64; tot3: Int64; tot5: Int64; tot35: Int64; cnt3: Int64; cnt5: Int64; cnt35: Int64; begin cnt3 := cnt div 3; cnt5 := cnt div 5; cnt35 := cnt5 div 3; tot3 := 3*(cnt3*(cnt3 + 1) div 2); tot5 := 5*(cnt5*(cnt5 + 1) div 2); tot35 := 15*(cnt35*(cnt35 + 1) div 2); total := tot3 + tot5 - tot35; end; Execution time is less than 1 Millisecond.
  15. Dalija Prasnikar

    Strange Benchmark Results; Am I Missing Something?

    LOL I should have known better than doing math first thing on Sunday morning.
  16. Anders Melander

    Delphi 11.1 is available

    I don't think it was the environment that turned the forums poisonous. I think it was the almost complete refusal to acknowledge the many problems which alienated a lot of former champions of Delphi (myself included) and made them feel betrayed. Disgruntled fans are often very vocal in their criticism. Anyway, water under the bridge.
  17. Roger Cigol

    Delphi 11.1 is available

    I enjoy being an MVP and benefit greatly from conversing with esteemed colleagues, many of whom are much more experienced and widely knowledgeable than me. I keep a track of all the time I spend on MVP related tasks. At my standard programming hourly rate I spend significantly more time on MVP work than the cost of the annual subscription for "RAD Studio Enterprise". So yes, @Uwe Raabeis correct it does come with "some obligations".
  18. Anders Melander

    Micro optimization: IN vs OR vs CASE

    Okay then, here's a comment: If you really cared about performance then you would profile your code and direct your efforts at areas that would make an actual difference on a higher level.
  19. Solved by enabling project option in screenshot! Now 18.824 devices. Thanks!!!
  20. pyscripter

    SynEdit just got a major uplift

    A new Word-like spell checking has been added to SynEdit.