POV-Ray : Newsgroups : povray.macintosh : Some simple testing needed : Re: Some simple testing needed Server Time
14 Oct 2024 14:46:03 EDT (-0400)
  Re: Some simple testing needed  
From: jr
Date: 13 Feb 2019 15:40:00
Message: <web.5c647fef870ad94abcd610c90@news.povray.org>
hi,

clipka <ano### [at] anonymousorg> wrote:
> can a few of you folks please run the following little program on your
> computers and report the time it takes to run?
> --------------------------------------------------
> #include <chrono>
> #include <thread>
> #include <iostream>
>
> inline void Delay(unsigned int msec)
> {
>      std::this_thread::sleep_for(std::chrono::milliseconds(msec));
> }
>
> int main()
> {
>      int count =  1000;
>      for (int i = 0; i < count; ++i)
>      {
>          Delay(1);
>      }
>      std::cout << "Done." << std::endl;
> }
> --------------------------------------------------
> On Windows Subsystem For Linux I see results like the following:
>
> real    0m1.782s
> user    0m0.000s
> sys     0m0.000s
>
> But as I presume this is using the Windows scheduler, I expect that
> genuine Linux systems may behave differently, and I'm also interested in
> other platforms (Mac, maybe BSD if some of you folks are using that, or
> actually any system you can get your hands on.)
>
> I have also reason to believe that results may differ between compilers.
> Using g++ 5.4.0 here.

the laptop (i3 2.3GHz):

jr@goose:46:tmp$ time ./a.out
Done.

real    0m1.109s
user    0m0.004s
sys     0m0.031s

jr@goose:47:tmp$ c++ --version
c++ (GCC) 5.5.0
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

jr@goose:48:tmp$ cat /etc/slackware-version
Slackware 14.2

uses 4.4.157 kernel.


on another i3 (3.1GHz):

jr@crow:10:tmp$ time ./a.out
Done.

real    0m1.084s
user    0m0.002s
sys     0m0.010s

jr@crow:11:tmp$ c++ --version
c++ (GCC) 4.8.2
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

jr@crow:12:tmp$ cat /etc/slackware-version
Slackware 14.1

uses 3.10.17 kernel.



regards, jr.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.