Jump to content

Tommi Prami

Members
  • Content Count

    602
  • Joined

  • Last visited

  • Days Won

    7

Everything posted by Tommi Prami

  1. Spoiler, SwitshToThread <> Sleep(0). https://stackoverflow.com/questions/1383943/switchtothread-vs-sleep1 Sleep(0) will allow threads on other processors to run, as well. Seems that this is quite tricky, dependig what yuo are doing and what you are trying to achioeve. No silver bullets... -tee-
  2. Tommi Prami

    Interesting read about Sleep(0/1) and SwitshToThread

    That is where this journey started... 😉 -Tee-
  3. Tommi Prami

    Interesting read about Sleep(0/1) and SwitshToThread

    One of the replies says that SwitchToThread will yeld to waiting thread on same CPU (not the core). If computer has multiple CPUs then Sleep(0) would run threads on other CPU also. That's how I understood the repply. But, thread cheduler might have changed over the years, so these might be very hard to be sure how it behaves... -Tee-
  4. Tommi Prami

    Interesting read about Sleep(0/1) and SwitshToThread

    As I understand what they say, for some ypou would need multiple CPUs. You for sure might have such a hardware. Thanks for extra info.,..
  5. Tommi Prami

    Delphi 13 beta

    Hello, In case of I get Invite, if someone can make good guess to get JCL to install and compile on the beta. I would download it just in case. -Tee-
  6. Post bug reports or feature requests what you feel need some publicity. I'll post mine: Default "styled elements" appears to the inherited form needlessly (into dfm) https://embt.atlassian.net/servicedesk/customer/portal/1/RSS-779 Add Compiler/AST assisted "With remover" refactoring tool https://embt.atlassian.net/servicedesk/customer/portal/1/RSS-1666 SimpleRoundTo returns wrong value https://embt.atlassian.net/servicedesk/customer/portal/1/RSS-1651 -Tee-
  7. Sometimes one have questions that answer is not that easy 🙂 Or need quite bit of work. Lately I've had two. Where this unit is linking from? Which units in this project has initialization and/or finalization sections? I bet there are tons of these good questions we sometimes would need answers for 🙂 There might be something for these. Plain search for files does not help usually, because all depends what is linked into the specific project. -Tee-
  8. Hello, Tried to find the documentation of [ref] attribute, famously used in FreeAndNil -implementation lately, but could not find it from Embacdero help. (FreeAndNil is defined as: procedure FreeAndNil(const [ref] Obj: TObject);) So could someone point me to the documentation of the attribute ands/or explain what it actually does? -Tee-
  9. Tommi Prami

    JSON benchmarks

    Way cool! Is there test/comparison is Objects and/or Record serialization supported and speed etc?? Did not check code, because bit busy... I've used Grijjy in one of my hobby projects for serializing objects and/or records. Can't remember which they all are, poossibly both)
  10. Tommi Prami

    Help with JWToken

    { "aud": "1", "jti": "c455147e32d593e35fe", "iat": 1746708640.21844, "nbf": 1746708640.218443, "exp": 1746715840.20109, "sub": "8314", "scopes": [ ], "user": { "name": "Prami Tommi", ... I've got JWToken that to me seems that is not standard. exp etc should not be float, but "UnixDate" is integer (Can't remeber what it is called on top of my head.) Is this some weird standard or just plain wrong? Did some googling but did not find any JWToken standard that would accept this. -Tee-
  11. Tommi Prami

    Help with JWToken

    Unix Epoch is seconds, maybe fractions of seconds. But never the less, to me it seems to be agaisnt the standard. That it should be integer.
  12. Do you have any good sources of this? (To send people that might be interested)
  13. FYI: https://probablydance.com/2018/06/16/fibonacci-hashing-the-optimization-that-the-world-forgot-or-a-better-alternative-to-integer-modulo/ -tee-
  14. People tend to forget things. Right? As I recall ChatGPT gave virtually identical code also, but does not change the fact that I messed up... (EDIT: What I tried to say with that ChatGPT thing wea that I think (if recall) made ChatGPT implementation first. Checked out the API calls made, Google search and found the Grahics32 implementation and went with that. I think I had no intention to make the reposiotory public of that extracted version. As I was just testing the effect of the performance cores only thing out of curiocity, but at some point thought that mayeb some one also would like to use that. At that point most likely did not even think of the origin of the code any more. etc. I should have, for sure. Would not like to hijack more this thread on this, hope all is good now as the license is changed and added reference to the oigin, make issue on the project if something else is needed to fix)
  15. Is there Lock free or Thread safe containers in Sping4D... Asking for a friend 😉 -Tee-
  16. At least in my case, I ran 7-Zip processes in parallel, windows did piss poor job of allocating those prcesses to perdormance cores. Anyones mileage migh vary for sure.
  17. It is mostly from there. I think. I thought I made it clear in code or GitHUB, let me check. I think I found few starting points, when searching the solution for the problem. If you’re referring to what I said earlier, that I did write it. I honestly did no longer remembered where it originally came from. I’ll make sure to give credit to the project. In other words, I had no intention of taking credit for something that isn’t mine. -Tee-
  18. Helllo, Depending on your CPU, you might need to set Affinity mask for the threads. If you have new Intel CPU with P and E cores you get wildly different results depending on which core threads are running at. Made siple unit top get Affinities: https://github.com/TommiPrami/Delphi.ProcessAffinity.Utils If you use it and find bugs, please make pull reguest. -Tee-
  19. Tommi Prami

    Rapid.Generics revamp

    Could you please make the benchmark results like in the original version has. And possibly add the original into the mix, so can see how much the bugfixes ads overhear, correctness sometimes sadly has some penalty 😉 But anyhow, would be good addition.
  20. Tommi Prami

    OtlParallel Memory Leak

    He was most likely talking to me, not to you, but he started it ans for sure not been insulting everyone, so... Not sorry...
  21. Tommi Prami

    OtlParallel Memory Leak

    Heh.. You seem to have no crasp of Multi threaded development, and fail to listen ones that REALLY know what tey are talking about,. (No need to listen me, but above there are messagews from people, that really know their shit, but...) -Tee-
  22. Tommi Prami

    OtlParallel Memory Leak

    I bet you did not fix the actual problem here. -Tee-
  23. Tommi Prami

    OtlParallel Memory Leak

    If you write and/or access same string from multiple threads, is not thread safe. If you did not get errors or memory leaks is pure luck, or you did not check memory leaks with tool, that actually will report you the actual horror of updating strigg from multiple thread without proper protection (not a condom) -Tee-
  24. Tommi Prami

    function declarations without ; at the end

    Maybe you could make bug report to emba, maybe they fixit or not. -Tee-
  25. Works. Thank you very much! -Tee-
×