Jump to content

David Heffernan

Members
  • Content Count

    3710
  • Joined

  • Last visited

  • Days Won

    185

Everything posted by David Heffernan

  1. David Heffernan

    Parallel for 32 vrs 64bits

    The issue is that x64 trig functions are very slow for very large values. Nobody actually wants to know sin for 99999999/pi radians. Put in sensible values for the argument to sin and it looks more reasonable. For instance try using T:=Sin(i/99999999);
  2. David Heffernan

    RTTI info for TBytes using runtime packages

    Essentially what the original post tells you is that these two types are distinct. Since they are declared in the rtl package, at least one of your modules is not linking to the rtl as a runtime package.
  3. The best way is that you understand your design well in the first place. My reading of your various posts is that a lot of the time you are developing your code by following methodologies used like a recipe. I suspect that with a deeper understanding of why these methodologies were being used then you wouldn't find your code alien when you encounter it.
  4. David Heffernan

    FastMM5 now released by Pierre le Riche (small background story)

    Impossible to know without benchmarking. Depends on what your application spends its time doing.
  5. David Heffernan

    Delphi 2010 giving floating point error

    Mask floating point exceptions, probably
  6. David Heffernan

    Experience/opinions on FastMM5

    Another way to improve performance is to design the code to minimise heap allocations. The best way to optimise a block of code is not to bypass it.
  7. David Heffernan

    FastMM5 now released by Pierre le Riche (small background story)

    It's pointless to say that one memory manager is n times faster than another because usage varies so much. One thing that is surely true is that different applications have different needs. I'm personally pretty sceptical that one single memory manager can perform optimally in a wide range of usage scenarios. Nothing wrong with choosing the MM that best fits each application.
  8. David Heffernan

    TrayIcon resfresh method

    Oh. This again. Surely your users can just make the the icon appear always if they want to. Perhaps they don't want to.....
  9. David Heffernan

    Delphi Closedown Error

    There are lots of bugs in the IDE that could explain this. But this could equally be caused by bugs in design time packages or plugins that you have installed. It won't be caused by the code that you are compiling in the IDE.
  10. David Heffernan

    TrayIcon resfresh method

    I don't understand the problem. I think that if you want some input you'd need to make it more clear to us what your code is doing and how it fails to achieve your goals.
  11. David Heffernan

    Delphi Closedown Error

    You could just ignore the error. Is it causing any trouble.
  12. David Heffernan

    Experience/opinions on FastMM5

    Use a different memory manager then. You don't have rights to other people's work. Do I have rights to your work? What on earth are you smoking?
  13. David Heffernan

    Experience/opinions on FastMM5

    Wrong. They are restricted by the GPL.
  14. David Heffernan

    Experience/opinions on FastMM5

    That's not really the point. The developers of any code own it. They get to choose how they licence it. They have many options. Basic decency says we respect their choices. I'm confident that every person who is critical of somebody else's choice of licence would flat out reject it if anybody told them how to licence their own software.
  15. David Heffernan

    Experience/opinions on FastMM5

    Don't use the hammer then. Make your own. Your choice.
  16. David Heffernan

    Experience/opinions on FastMM5

    Yeah, that makes a lot of sense. I could do this, but I'd probably need a little guidance on how to integrate fastmm5 with my program, making sure it was configured properly, and used the right branch.
  17. David Heffernan

    Experience/opinions on FastMM5

    I would expect so, but I don't know for sure. I do know that when using HeapCreate / HeapAlloc this is true, but that's no use to you. I do have a NUMA machine to hand and would be happy to run some tests on it if that would be useful for you.
  18. David Heffernan

    Experience/opinions on FastMM5

    My question was based on my own experience running multithreaded floating point software on NUMA machines, an issue that was live for me maybe three years ago. My problem was that most memory managers allocate out of a shared pool, but that cross node memory access is much more expensive than within node memory access. I didn't find any Delphi memory managers that were both robust and able to allocate memory local to the node on which the calling thread was executing. IIRC, allocators such as that of TBB and others used in the C++ world were able to do this. My application is a little different to more mainstream Delphi applications however. I understand that fastmm targets usage with frequent allocation of relatively small objects. In my application I preallocate wherever possible and avoid allocation in any hotspot. So my goal could just be boiled down to achieving affinity to the local node. In the end I wrote my own memory allocator on top of HeapCreate / HeapAlloc etc. The strategy is the each NUMA node has its own private heap (allocated by a call to HeapCreate). Each allocation is performed on the heap associated with the calling thread's node. I'm not in any way suggesting that such a simple strategy would be appropriate for fastmm. The interesting thing that I observed is that raw heap allocation / deallocation performance was never a problem for my app, because of the efforts we took to avoid allocation in hotspots. Likewise for thread contention, for the same reasons. The issue was that memory access speeds in my app is a key performance factor. And cross node access has dire performance.
  19. David Heffernan

    Experience/opinions on FastMM5

    Fine if you are multiprocessing, but not if multithreading.
  20. David Heffernan

    Thread programming without sleep or WaitFor events

    Unlucky for you. We've stopped supporting Windows 7, after all MS doesn't anymore.
  21. David Heffernan

    Delphi Closedown Error

    BPL not corrupted. Just a defect in some code that runs inside the IDE.
  22. David Heffernan

    Experience/opinions on FastMM5

    Would be interested to know whether NUMA memory is handled well.
  23. David Heffernan

    Thread programming without sleep or WaitFor events

    Regarding timers and energy use: https://randomascii.wordpress.com/2013/07/08/windows-timer-resolution-megawatts-wasted/
  24. David Heffernan

    Thread programming without sleep or WaitFor events

    You asked the same question on SO: https://stackoverflow.com/questions/61505887/thread-programming-without-sleep-or-waitfor-events It was closed there because it lacked focus. You seem to be wanting advice to a level of detail that far outstrips the level of detail used to specify your problem, and your current solution. In my view you are unlikely to be anything much out of a question asked the way you did. I recommend that you step back and provide a lot more detail and background. That will give you more hope of getting relevant advice.
  25. David Heffernan

    Capturing Console Output

    https://stackoverflow.com/q/19054789/505088
×