Jump to content

mikerabat

Members
  • Content Count

    43
  • Joined

  • Last visited

  • Days Won

    1

mikerabat last won the day on December 19 2018

mikerabat had the most liked content!

Community Reputation

24 Excellent

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. mikerabat

    SIMD QSort

    I didn't knew that this would trigger such a response gg Hi Stephan! Will there be some code to examine 😉 Quite good numbers 🙂 !!
  2. mikerabat

    SIMD QSort

    Tried to create a SIMD (AVX2 based) Quicksort: https://github.com/mikerabat/SimdQSort For anyone who is interested... It supports Int32, Int64, Single and Double Array sorting - no custom struct size nor user defined compare procs. Speedup for large random arrays is up to 3.5 🙂
  3. mikerabat

    tray notification dll delphi11.3/Delphi 2010

    As I see that this is the same mechanism just not in the main thread.
  4. mikerabat

    tray notification dll delphi11.3/Delphi 2010

    Thanks for the suggestion. I'll try that one though I think it will not solve our problem in the first place - we already use the TTrayIcon component that allows to show balloon hints in the tray. BUT... (there is always a but..) we have a hard time to cancel the hints if they occure in a rapid way. That was no problem in winxp and win7 - there it worked well - but on newer OS's the tray does not cancel properly but rather shows the hint for a few seconds. This is quite annyoing for users since all the action has already been done and the hints still pop up. Note that we do not know in beforehand how long the hints are shown - sometimes it takes long (depeding on the amount of data transferred) sometimes it is fast... The newer toast notifications seem to resolve that problem but have this other nasty problem ... Anyhow I think the last change did the trick...
  5. mikerabat

    tray notification dll delphi11.3/Delphi 2010

    I implemented a a timer and posting messages. If we catch a reentrance call I setup a timer that tries again in 50ms - that seems to fix the problem... notifyImpl.pas trayNotifications.dpr
  6. Following problem: Our main platform for developing our applications is still D2010 (don't ask why..). One of our applications we develop used to use the standard tray icon ballon hints which have a few problems on newer platforms - win 11 especially. So.. the task is to use the toast notification component from D11. To do that I ccreated a small dll that exports a function returning an interface that handles the notification - basically show and cancel the hint. There are some events that may happen in a rapid timing. I carefully designed the dll such that the notifications are only shown and hidden in the main thread. The problem is that I encounter sometimes nasty access violations that I cannot account for... Here is my theory: Showing and hiding toast notifications through the winrt api somehow invokes something like Application.processmessages - I can confirm that during the hide call the show call is reentered (since I put something from a thread in the message queue that triggers a balloon hint to be shown) so either the show call or the hide call result in a nasty AV. (one call on the toastnotification center is not finished and the next one is already there...) I tried to "wait" for the call to be finished but spin waiting blocks the notification stuff too and I actually do not want to have another handler implemented in the d2010 app.... Has anyone experienced something like this (aka is there an easy solution) Could a queue be a solution -> the main app just queues the call an in a message pump (wndproc of an allochwnd call) I handle it myself? Any chance that some winrt init call is missing or can be done different such that it does not show that behaviour? Attached the two files that account for the dll kind regards Mike notifyImpl.pas trayNotifications.dpr
  7. This not entirely correct - all basic types aren't. Strings, interfaces and dynamic arrays are initialized to nil.
  8. mikerabat

    Intel Simd-sort library

    I'm not sure about exactly this library but some predecessors indeed were able to sort pointer list whereas the "key" is a float/int 32/64 . The key can be specified as an "offset" to the starting address -> this allows to sort pointers to records/classes.... at least that is the way they do it in "Fast quicksort Implementation using AVX Instructions" The definitions in the library for AVX512 are actually using arrays of templates so I guess that means that you can sort records right not only Double/float... ? This problem is solved by an algorithm that allows to extract the kth largest element (not only the median) -> basically it does the partitioning of quicksort but does not sort hte "unnecessary" half. That in fact allows to pick the median in O(n) (roughly) time.... And if you want to go fancy you can do a rolling median over an array of doubles. The algorithm can be found here: https://github.com/mikerabat/mrmath/blob/master/RollingMedMean.pas
  9. mikerabat

    Fast Base64 encode/decode

    @David Heffernan That would be against the direction I develop here - first I need the working ASM 😉 then the tool can use the disassembly to create the db instructions....
  10. mikerabat

    Fast Base64 encode/decode

    Thanks for the input - I will beef up the tool to get at least the else part aligned on the right side 😉 that really looks nicer.
  11. mikerabat

    Fast Base64 encode/decode

    Jus FYI: That is intentional - the left side shall show the original assembler call the right side the DB translation -> my tool, that derrives the DB statements from the assembler code does a line by line comparison.
  12. mikerabat

    Fast Base64 encode/decode

    I just released an assembler optimzed (AVX2 set) Base64 encoding/decoding unit. check it out under https://github.com/mikerabat/fastbase64/ My reference implementation achieves up to 10 times speedup against the reference Indy implementation. Let me know what you think or if you encounter some errors...
  13. mikerabat

    Tab key in the IDE

    That is actually interesting... If I use the same settings I got a different result (aka the annoying one). (sorry I cannot create such a neat little video 🙂 ) I'll check if GExperts or DDevextension interfere here...
  14. mikerabat

    Tab key in the IDE

    Sorry... the tab key is broken or at least behaves completly different than in Delphi 2010 (or afaik Delphi 10.4) which is ... anoying. e.g.: Consider the following code Result := Format('%s;%s;%s', [ DateToStr( fDay, Fmt), TimeToStr( fFrom, Fmt ), TimeToStr( fTo, Fmt ) ]); when you place the cursor just behind the '[' bracket and then press enter the cursor is placed just below the R of Result... so far so good. But... In previous Delphi versions - when tab is invoked - the cursor jumps to the ":" then to "F" of format. Now the tab just moves the cursor by 2 (acording to the setting) which is actually anyoing. Another case: Consider the following code (we like to have the then else block that way in case the statement is only one line aka without begin end): if fLunchLen > 0.01 then Result := Result + Format(';%s;%.1fh', [TimeToStr(fLunch, Fmt), fLunchLen], Fmt) else Result := Result + ';;'; // no free lunch... it bloody friday! When you place the cursor behind then, press enter -> press tab in previous delphi versions the cursor was placed just right below the then... now it only jumps by 2. any comments on how to get that old behaviour back is highly appreciated... kind regards Mike
  15. mikerabat

    Tab key in the IDE

    sorry that doesn't help ... I have to hit tab quite often such that it jumps to the desired place. Anyone else that has problems with that? Or ... does anyone excatly know what changed in this version?
×