-
Content Count
3711 -
Joined
-
Last visited
-
Days Won
185
Everything posted by David Heffernan
-
Micro optimization: IN vs OR vs CASE
David Heffernan replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
What proportion of the overall time your program takes for the task, is the operation you are trying to optimise in this thread? -
Why isn't this dangerous, or is it?
David Heffernan replied to Renate Schaaf's topic in Algorithms, Data Structures and Class Design
You aren't. The code in @corneliusdavid post is what you should do. -
Why isn't this dangerous, or is it?
David Heffernan replied to Renate Schaaf's topic in Algorithms, Data Structures and Class Design
No I don't think so. Follow the actual rules. When you create an instance, destroy it in the same context that you created it. -
Is Move the fastest way to copy memory?
David Heffernan replied to dummzeuch's topic in RTL and Delphi Object Pascal
I think Arnaud's synopse library has a bunch of more optimised mem copy routines -
New Delphi job opportunity
David Heffernan replied to Berocoder's topic in Job Opportunities / Coder for Hire
You will only consider graduates with computing degrees? Seems like that would rule out a lot of good candidates. -
Strange Benchmark Results; Am I Missing Something?
David Heffernan replied to Joseph MItzen's topic in I made this
Interlocked is always going to be terrible here. Local accumulation, join, and then a final summation would be better. A magic parallel=true flag is fanciful. Why look at Python. Surely look at the various C++ compilers? -
Strange Benchmark Results; Am I Missing Something?
David Heffernan replied to Joseph MItzen's topic in I made this
The value of the summation an be evaluated statically. I don't think any compilers do this, but I could be wrong. -
Strange Benchmark Results; Am I Missing Something?
David Heffernan replied to Joseph MItzen's topic in I made this
A really good compiler would remove the loop and just turn it into a simple assignment -
Micro optimization: IN vs OR vs CASE
David Heffernan replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
The familiar refrain, but the message has not landed yet -
TIniFile uses deprecated Windows APIs that haven't been safe to use since 32 bit Windows was release nearly 30 years ago. So yeah use TMemIniFile which has a native Delphi INI parser that won't cause you such trouble. Never ever use TIniFile is the rule here.
-
Trying to avoid using SetString when doing a token lookup in a TDictionary
David Heffernan replied to MarkShark's topic in RTL and Delphi Object Pascal
I think I'd write a custom dict for this. -
TThread Resume Suspend deprecated (Not synchronization)
David Heffernan replied to Clément's topic in RTL and Delphi Object Pascal
I don't think any amount of care can solve the issues there -
Delphi 11.1 is available
David Heffernan replied to Uwe Raabe's topic in Tips / Blogs / Tutorials / Videos
I'm so excited about this feature -
Delphi 11.1 is available
David Heffernan replied to Uwe Raabe's topic in Tips / Blogs / Tutorials / Videos
Found and reported load of bugs that haven't been fixed and aren't in the public QP. -
Can you just look at the RTL source code and work it out?
-
https://docwiki.embarcadero.com/Libraries/Alexandria/en/System.StrUtils.SearchBuf Suggests it is now in the AnsiStrings unit.
-
Build a Windows GUI shell in Delphi (CarPC)?
David Heffernan replied to PaulD's topic in General Help
Windows and Delphi must be the wrong tool for this task. There was a time when you didn't know Delphi. You learnt it. Is it so hard to imagine learning again? -
Distributing DLLs with an exe is really very trivial. Either in the same directory as the exe or a sub directory as an assembly using manifests. Linking .obj files to an exe is a tricksy business. You need to supply the C RTL and for complex libs that is often very hard to achieve. And then on x64 you have the longstanding bug that the Delphi compiler doesn't pick up pdata sections with the exception tables. So exceptions in the C code can just terminate the process.
-
Often because of dependencies on 32 bit code. Like how the Delphi IDE is. Personally I think could drop 32 bit support now and my customers would be fine with it.
-
I tend to use msys2 to build such libraries. Generally very simple to get it built.
-
So it's more geared towards looser coupling, a more scripting like approach. I guess if I know the external code I want to use at compile time then linking to a DLL in the classic fashion is generally preferable.
-
Would be nice to know what's actually going on here, but all I can see is an opaque DLL which seems to have all the implementation in it.
-
I need to merge these two codes but I have little programming practice.
David Heffernan replied to MrCamarium's topic in Network, Cloud and Web
Start by reading the error message and thinking about what it means. Then look up the documentation for the error message. Don't give up so easily. Just because you made a mistake, don't assume that you can't solve it yourself. Think harder. Keep trying. -
I need to merge these two codes but I have little programming practice.
David Heffernan replied to MrCamarium's topic in Network, Cloud and Web
That message is clear. At least it is clear to me. Do you understand it. It's very hard to express this without sounding mean, but you aren't going to succeed in your goals without first getting the appropriate tools. Which in this case means more programming skills. You said yourself that these are lacking. Stop trying to solve problems that are beyond your current capacity, and start seeking to gain the skills you need. -
No, this isn't business as usual. The broken docwiki is not because they are improving it. I know that they are working on a new system, but the old one broke on its own accord. At least that's what I understand from a PM from Marco.