[Solved]calculating code efficiency lazarus / 21-General ---------------------------------------------------------------------- Ten_Mile_Hike · 2025-02-04 21:04 It is a trivial task to determine the time it takes to execute a command, an entire subprogram, or an entire program. In Lazarus how would I "easily" determine the number of CPU operations, heap,  stack & memory bus transfers that a particular code segment produces as well as the time intervals of the same? I am aware that the above tasks are sometimes accomplished by a "profiler" program. Is there a "free $$" and robust profiler for Lazarus/FPC that any of you use? TIA P.S. I'm writing this in a dark coffeeshop on my cell         without my reading glasses; I therefore disavow         all spelling and formatting errors ---------------------------------------------------------------------- Paolo · 2025-02-04 21:36 QuoteIt is a trivial task to determine the time... Really ? ---------------------------------------------------------------------- Martin_fr · 2025-02-04 21:39 I don't know if you can get all the details from this, but you could look at cachegrind and callgrind (both part of valgrind), combined with kcachegrid as result viewer. There is also a heap analyser but I never looked at it yet. They do require Linux. So only if your app can be compiled for Linux. ---------------------------------------------------------------------- Ten_Mile_Hike · 2025-02-05 01:42 Quote from: Paolo on February 04, 2025, 10:36:49 pmQuoteIt is a trivial task to determine the time... Really ? Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i Yes; crude and not rigorous, but fine for casual evaluation of code changes to ensure no sudden bottlenecks {Unit Dateutils}Athen:=now;For x:=1 to 1000 Do BusyFunction(x);Interval:= MilliSecondsBetween(Now, AThen: Double); ---------------------------------------------------------------------- Ten_Mile_Hike · 2025-02-05 01:45 Quote from: Martin_fr on February 04, 2025, 10:39:13 pmI don't know if you can get all the details from this, but you could look at cachegrind and callgrind (both part of valgrind), combined with kcachegrid as result viewer. There is also a heap analyser but I never looked at it yet. They do require Linux. So only if your app can be compiled for Linux. Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i Thank you Martin