Jump to content

hsauro

Members
  • Content Count

    17
  • Joined

  • Last visited

Community Reputation

7 Neutral
  1. Interesting, the page just gives GUI examples but i assume I could compile straight object pascal to webassembly. I should get touch with them to find out more.
  2. It would be fun if there were an object pascal to webassembly compiler.
  3. I notice the new 10.3.1 RAD server console Is not written in Delphi? Any particular technical reason why it couldn’t have been developed in Delphi? Ok I see it’s a browser application, is that the reason?
  4. Slightly off topic I know but what what is the rational for having immutable strings in languages such a Java, Python etc? It seems immutability is related to efficiency and security. I didn’t find the arguments that compelling however. It seems it’s either to stop the programmer from getting into trouble or it makes like easier for the complier writer.
  5. hsauro

    Rio quality disappoint

    I’m still using Tokyo 10.2 and XE6 for some older projects. Haven’t hamd’t any real problems with either. Will wait for an update before I use Rio.
  6. Using record constructors like this is very convenient but I wonder what the speed penalties are like?
  7. hsauro

    Measure Process Time

    I’ll try that, thanks.
  8. hsauro

    Measure Process Time

    Out of interest, I thought I'd show a scatter plot of the mean and standard deviation from 100 independent runs. Each data point was obtained by measuring how long it took to run a particular method and repeating this 10,000 times and taking the mean and sd for that data. Each set of 10,000 measurements was an independent run started from a batch file. The application itself was run 100 times from the batch file which yields the 100 data points in the plots below. It is interesting to note some outliers around the 35 and 90 iteration. I never touched the computer during this run so this could be some internal housekeeping going on. The standard deviation has quite a bit of variability but ignoring the outliners the mean is fairly consistent at 3.5. Having seen this data I have more confidence in the mean. Y axis is time and x axis is the run number. The code is doing a lot of memory allocation and deallocation of small blocks of memory (16 bytes at a time) and a lot of simple calculations (but no I/O). Out of interest, the following graphs were obtained where all 100 runs were done in the same application. (no batch file) What I thought was interesting is the decline in the standard deviation as the program progressed. Not sure what the blip at 20 or 70 is. Herbert
  9. hsauro

    Measure Process Time

    Exactly that's why I was asking if there was a way to measure the actual amount of time spent in my process and not dealing with everything else which is unpredictable.
  10. hsauro

    Measure Process Time

    My concern was if the time measured is all CPU activity them comparing different implementations of my code run at different times might give unreliable estimates because there could be a different amount of background activity in the two runs. I presume this is the origin of most of the variability I am seeing. I have noticed there is an initial startup component to the variability (cache vs hard drive I assume) and that repeated runs after the first few runs stabilize the times to be less variable. I've noticed that timings I see reported byothers often have no variability estimate on them. Herbert
  11. I am measuring the performance of some Delphi code using TStopwatch and I'm seeing considerable variation in the computed times. I run a method 10,000 times and record the time. I then do this 200 times (all within the same program) from which I get an average time of 3.79 seconds for the 10,000 runs with a standard deviation of 0.55. That seems to be quite a large variability. My question is, does TStopwatch measure the total time elapsed or just the time spent on my particular process? If it measures the elapsed time is it possible to measure the amount of time specifically used to execute my code? Herbert
  12. Thanks for that. So it's better to use f = TStreamReader.Create (TFileStream.Create (fileName, fmOpenRead)) because one has more control over the flags.
  13. What is the advantage of using TFileStream with TStreamReader compared passing the filename directly to TStreamReader? For example, what is the difference between these two: f = TStreamReader.Create (fileName) or f = TStreamReader.Create (TFileStream.Create (fileName, fmOpenRead))
  14. hsauro

    Font too small or too light

    Here is a screen-shot that shows the fonts used by G+, default delphipraxis and my original message where I happened to change the color to black. It looks like the color used by G+ is the same as default delphipraxis but the font size is slightly larger. In future I'll probably use a slightly larger font in delphipraxis messages.
  15. Is there any chance to increase the font size and/or use a darker font color for topic text? I find the current configuration a bit difficult to read. I compared the font used here with what we had in Google_ and the google+ font is much easier on the eye. Maybe there is a configuration setting at my end I can change? When I edit this message I can change the font color and size.
×