Re: Co_Routines Support for Oberon
Posted: Thu Apr 13, 2017 7:47 pm
More precise measurements with background tasks.
I've compared calculation time for ObxCoroutines.RunPrimes and Co_ObxActions.StartPrimes.
Initial conditions:
1. modified Co_ObxActions to set Co.Yield in the same place, as in ObxCoroutines.
2. excluded time consuming primes logging calls.
3. set 100% CPU usage threshold for Co_ scheduler
Called parameters:
limit = 10000000
The results are (with 10% inaccuracy):
I've compared calculation time for ObxCoroutines.RunPrimes and Co_ObxActions.StartPrimes.
Initial conditions:
1. modified Co_ObxActions to set Co.Yield in the same place, as in ObxCoroutines.
2. excluded time consuming primes logging calls.
3. set 100% CPU usage threshold for Co_ scheduler
Code: Select all
s := Ct.scheduler;
p.interval := 50; (* 50 ms *)
p.load_pct := 100; (* 100% cpu *)
s.SetParams(s, p);
limit = 10000000
The results are (with 10% inaccuracy):
- 37.80 sec - ObxCoroutines
- 5.61 sec - Co_ObxActions
- 18.1 sec - Co_ObxActions with default parameters (usage for bg tasks is 40% limited)
- 5.41 sec - Co_ObxActions as foreground task (Co.Yield excluded)