-
Content Count
3536 -
Joined
-
Last visited
-
Days Won
175
Posts posted by David Heffernan
-
-
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.
-
3
-
-
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.
-
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
-
If possible you should use side by side assemblies
-
Those links are to Stefan's clone. What about the author's repo?
-
Do you have any particular reason to believe that XE is a supported compiler?
-
Why do you feel that there might be a problem? The rules for identifiers are well documented. These all meet the rules.
-
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).
-
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
-
-
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.
-
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.
-
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.
-
Mask floating point exceptions, probably
-
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.
-
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.
-
Oh. This again. Surely your users can just make the the icon appear always if they want to. Perhaps they don't want to.....
-
2
-
-
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.
-
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.
-
You could just ignore the error. Is it causing any trouble.
-
3 hours ago, David Schwartz said:My comment was about the licensing terms, not the product or developer's choice.
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?
-
2
-
-
3 minutes ago, Darian Miller said:But there are also no restrictions placed on those that receive your code.
Wrong. They are restricted by the GPL.
-
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.
-
5
-
-
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.
-
6
-
-
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.
Delphi Rio IDE hangs again and again
in Delphi IDE and APIs
Posted
Amazing that they can't produce a 64 bit IDE....