Jump to content

David Heffernan

Members
  • Content Count

    3711
  • Joined

  • Last visited

  • Days Won

    185

Everything posted by David Heffernan

  1. David Heffernan

    Round

    Then I think the code from @Lajos Juhász is what you need
  2. David Heffernan

    Round

    What data type are you using? Currency?
  3. David Heffernan

    64bit RTL patches with Intel OneApi and TBB

    The winapi heap is what I use for my MM. With an added twist that I have distinct heaps for each NUMA node so that I can arrange that threads get memory that is efficient to access on NUMA machines.
  4. David Heffernan

    TTimer limit..

    Using a GUI timer like this is likely wrong anyway.
  5. David Heffernan

    64bit RTL patches with Intel OneApi and TBB

    This is surely correct. It's strange that people wouldn't be happy to have the allocator in a dll.
  6. David Heffernan

    Profiling Clipper2

    Pointer with increment vs direct array indexing should be very similar. In anything I think the latter tends to be a little quicker.
  7. David Heffernan

    Profiling Clipper2

    I simply don't use the RTL collections anywhere in my code and use my own implementation so I have full control of that. This is a serious undertaking, and not for everyone. So I'd recommend using the spring4d collections.
  8. I agree. My point is that OP keeps asking for buffering but that won't really help.
  9. Buffering isn't really going to help here, because the MM already does that in effect.
  10. I'm not sure what you are saying here. Writing to memory is just writing to memory. Be it some intermediate buffer or the memory block backing the stream. Can you explain what performance block you are trying to overcome. Reallocation is the only block I can see.
  11. Rather than buffering in this case I have a memory stream that doesn't use contiguous memory. Instead of a single memory block, it manages a list of equally sized blocks. This avoids any performance issues with repeated calls to ReallocMem. Is that the performance block you want to work around?
  12. David Heffernan

    Move a form a few pixels??

    Easier to replace the CRT monitor with an LCD
  13. Do you perhaps have code in different modules? Like code in an exe and a dll and the object is passed between the modules?
  14. I guess I'd be a bit concerned about floating point use here when Log10 returns an exact integer
  15. David Heffernan

    ShowModal does not show window after a few tries (It does not pop up)

    Seems like the problem is going to be in the code that we cannot see. Please make a minimal reproducible example.
  16. David Heffernan

    TBitmap32 to jpg (graphics32)

    Most likely if there was a leak it was in your code, that would be my best guess.
  17. David Heffernan

    TBitmap32 to jpg (graphics32)

    That would be due to a leak. Again though, I'm not aware that the VCL jpeg code leaks anything. Am I missing something?
  18. David Heffernan

    TBitmap32 to jpg (graphics32)

    I'm not aware that the VCL jpeg unit leaks. How are you measuring that?
  19. David Heffernan

    Creating my own .bpl

    I still don't really understand why people use packages other than for IDE plugins and components.
  20. Abs isn't going to help at all. The problem is that the compiler is seeing these values as 32 bit integers. Which is why I suggested the Int64 cast. But Brian appears to have the answer by the excellent method of reading the documentation. I should have done that!
  21. David Heffernan

    TBitmap32 to jpg (graphics32)

    I'm confused. The VCL ships with a JPEG encoder.
  22. Compiler sees these as 32 bit Integer. Does it help to write Int64(10000000000) .. Int64(99999999999) Also your case statement doesn't handle negative input values.
  23. It is utterly trivial to make such a thing using the exact same code as found in Random. You make a record that contains a seed and you add a method that uses that seed to generate the next sample, and then update the seed. If you have specific requirements for the properties of the PRNG then you may find the LCG used by Random doesn't meet them. In which case you'd need to decide what your requirements are.
×