Jump to content

David Heffernan

Members
  • Content Count

    3536
  • Joined

  • Last visited

  • Days Won

    175

Posts posted by David Heffernan


  1. Don't think of the problem as how to write the code effectively given the data structure. Think of the problem as choosing a combination of data structure and algorithm to solve your problem. In other words, ask about the underlying problem, and be prepared to consider a variety of other data structures, which in concert with the right algorithm might perform best.

    • Like 3

  2. 1 hour ago, Leif Uneus said:

     

    I still don't know why Embarcadero does not implement the FastCode purepascal Pos for win64. 

     

    https://quality.embarcadero.com/browse/RSP-13687

     

    In the example given, the fastcode win64 version is 8 times faster than System.Pos.

    8 times faster sounds amazing, if the only thing you ever do is call Pos on data that is already in the cache. I'll bet that for a lot of real world applications you wouldn't see any benefit.


  3. 48 minutes ago, Kees Dijksman said:

    @Stefan Glienke I am testing smart-pointers in Delphi Rio using Spring4D. Here is my testprogram. I created a generic TObjectlist and I want to add simple TObjects to this list using Shared.Make(TTestObj.Create). The problem is that whenever I add an object to the List the previous object is released. See the output of my program. Does anyone know how to solve this problem?

    Cross posted: https://stackoverflow.com/questions/61656924/smartpointers-do-not-work-well-with-a-generic-tobjectlist-in-delphi


  4. 7 hours ago, pyscripter said:

    Oh I get it.  sin is highly optimized in 32-bits but apparently not in 64-bits.

     

    No. That's wrong. In fact sin is quicker under x64 than under x86. Even though sin (and other trig) is implemented in hardware in the x87 unit, and in Pascal in x64 (because the SSE2 unit does not have built in trig).


  5. 9 hours ago, Ian Branch said:

    Hi Team,

    Please pardon my ignorance here, I have never done anything with Threading and I have no idea if any of the 3rd Party stuff I use does.  I suspect not but it is possible I suppose.

    So, to my Question..

    Given my non-threaded environment, aside from the Debugging aspects, I use EurekaLog, does FastMM5 provide any benefit over the native Delphi (10.3.3) memory manager?

     

    Regards & TIA,

    Ian

     

     

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


  6. 2 hours ago, Lars Fosdal said:

    So, our multithreaded TCP/HTTP event driven services do a lot of string manipulation, copying to/from buffers, converting objects to/from json / xml, etc.

    Can I expect FastMM5 to increase the throughput?

    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. 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. 


  8. 2 hours ago, Kas Ob. said:

    is this fair for the one who lend you that hammer ?

    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.

    • Like 5

  9. 2 hours ago, David Schwartz said:

    Oh, that one. "If I borrow your hammer then I have to give away everything I'll ever build with it in the future for free, even if it cost me a lot of time and money to build."

     

    Some folks have a strange notion of what "equity" and "balance" are about.

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

    • Like 6

  10. 1 hour ago, Pierre le Riche said:

    So effectively it does not matter which thread allocated the virtual memory, the thread that touches the page first will determine what memory is used to back it. It certainly would make a lot of sense for it to work that way.

    Yeah, that makes a lot of sense.

     

    1 hour ago, Pierre le Riche said:

    If you have a real-world workload that you could throw at it I would really appreciate the feedback.

    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.

     

×