A bit of news which I think has some interest here:
"Kattis" (open.kattis.com) is a site where students can make programming
exercises. This is quite important IMHO; companies look at Kattis
results when recruiting.
Recently, Kattis added Pascal support, using FPC 3.0.0! (Free Pascal
version 3.0.0+dfsg-2 whatever that means. The server runs Linux.)
I have made some of the exercises, and it works well. Not only that, I
routinely score in the top group in performance (together with all the
C++ solutions)! This is, of course, a matter of programming well, but it
is fun to see FPC outperforming Java all the time - and this is visible
to all users! Of course, *one* fast Pascal solution won't be noticed by
many, but still I think it is an opportinuty to show that our language
For instance, here is the statistics for the "Good Morning" problem.
Yes, that "1" on Pascal is me.
The results may be sorted also by language name and so all C++ results
comes in before Pascal even if runtime is the same. Your program was as
fast as No1 but anyway not visible among top ten. This outrageous! ;-)
On 08/17/2017 10:21 AM, Ingemar Ragnemalm wrote:
> A bit of news which I think has some interest here:
> "Kattis" (open.kattis.com) is a site where students can make
> programming exercises. This is quite important IMHO; companies look at
> Kattis results when recruiting.
>Maybe the results backend uses higher precision result values, and the web interface simply rounds it to two decimal places? ;-)
It seems most likely that the results are evaluated at more than 2 decimal places. I don't know why they would only display 2 decimal places, 1/100th of a second is a virtual eternity when it comes to processor time... thus proven by the huge number of 0.00s results in the list.. in order to display 0.00, the run time had to be less than 0.005s, but that's not surprising with a processors running in the GHz. You would think that after the site was running for 1 day they would have realized they needed to display more precision then 2 places.
When I was try to get timing information for efficiency comparison between procedures, I ended up having to run the test procedure in a loop at least 1000 times, sometimes 10million times because if I did not do that, they system timer resolution was not high enough to get an accurate count.
It would be very interesting to see the timings to more precision, because I would think that some of the timings would be exactly the same because when it comes down to optimizing procedures, different people could end up arriving at the exact same solution as far as the structure of the program is concerned. They should also rank other aspects such as compiled program size, amount of memory used, User Interface design (input and output clarity and formatting), effectiveness of documentation....etc. the best program isn't necessarily the one that executes fastest... Which is a 'better' program: program A that executes in 0.00018s that uses 1MB of RAM or Program B that executes in 0.00016s that uses 100MB of RAM