Jump to content

David Heffernan

Members
  • Content Count

    158
  • Joined

  • Last visited

  • Days Won

    3

David Heffernan last won the day on March 13

David Heffernan had the most liked content!

Community Reputation

80 Excellent

1 Follower

Recent Profile Visitors

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

  1. David Heffernan

    Rapid generics

    That's not the same as starting from scratch. Also, didn't you have trouble with bugs in you asm code in your bigint library?
  2. David Heffernan

    Rapid generics

    Well, that's exactly what I have been arguing for. It seems utterly insane to me that this task is handled at runtime when it can be handled at compile time. Anyway, as I understand it the record dtor would run in addition to the RTTI based finalization code. So adding a dtor could only ever make code slower.
  3. David Heffernan

    Rapid generics

    True years ago, but these days not so. Just put some code through godbolt and marvel at the code that it generates. You don't have to get that complicated before you see the compiler spotting optimisations that are very far from obvious. Optimisers now have deep knowledge of hardware architecture and can use that to make choices that are beyond almost all human asm programmers.
  4. David Heffernan

    Issue closing external apps..

    That's because your button event handlers run busy message loops waiting for the child processes to finish. Your mistake is to run those busy loops in the main thread. You should consider running those loops in dedicated threads, and obviously remove the message processing. You code leaks the process handles and has other problems. Duplicating the code is a bad idea. You should be using CreateProcess to create processes. Fundamentally I would say that your main issue is that copying code without understanding it is a bad idea. You then become unable to maintain it and are unable to critique it.
  5. David Heffernan

    Rapid generics

    Why would we want to finalize records manually? What a terrible retrograde step.
  6. David Heffernan

    Rapid generics

    I don't much care what you like, or don't like. My point was that there exist plenty of compilers that can emit optimised code that is exceedingly efficient, and extremely hard to beat by humans writing code themselves.
  7. David Heffernan

    Rapid generics

    You mean language rather than compiler.
  8. David Heffernan

    Delphi permutation code complexity

    Can I ask why you are interested in complexity of this algorithm? If it is for the sake of learning, fair enough, but there are far better examples to teach you. If it is for a real application, complexity is the wrong question to ask.
  9. David Heffernan

    Rapid generics

    Very hard to find them though, and so easy to find good compilers.
  10. David Heffernan

    Rapid generics

    Practical for small amounts of code that is seldom modified. Of course good compilers typically produce better code than humans can manage.
  11. David Heffernan

    Rapid generics

    I'm not talking about the runtime. I'm talking about the code emitted by the compiler when it compiles my code. Performance is critical for my program. Some of the critical sections of code I translated to C in order to reap significant performance benefits of having a good optimising compiler. So yes, this is a real issue.
  12. David Heffernan

    Delphi permutation code complexity

    The complexity is linear with the number of digits. In this case it's probably much easier to write the code if you convert each number to text. You then need an array of counts for each digit. Count the digits. Finally check that each digit has the same number of occurrences. In practical terms, complexity arguments aren't actually going to be relevant here. It's the constant of proportionality that will matter most in performance.
  13. David Heffernan

    Rapid generics

    I see pretty much the same code in 10.3 as produced by XE7 in my real world app, using the Windows x64 Delphi compiler. Performance is identical. Still significantly worse than could be achieved by the mainstream C++ compilers. Probably worse than what could be achieved in C#!
  14. David Heffernan

    Rapid generics

    Runtime optimisation only helps if your code relies heavily on the runtime functions that have been improved. And where are these improvements in the code emitted by the compilers? I've not seen anything. What has changed?
  15. David Heffernan

    Rapid generics

    It's more complex than that. Maybe for users of System.Generics.Collections. But what about those of us that write our own generic types?
×