fork download
  1. a := Array new: 365.
  2.  
  3. 100 to: 2500 by: 100 do: [:x |
  4. p := 0.
  5. 100 timesRepeat: [
  6. x timesRepeat: [a at: (Random between: 1 and: 365) put: true].
  7. p := p + (a count: [:y | y = true]).
  8. ].
  9. Transcript show: '%1 : %2' % {x. p asFloat / 1000}; nl.
  10. ].
  11.  
Success #stdin #stdout #stderr 4.87s 336320KB
stdin
Standard input is empty
stdout
100 : 35.374
200 : 36.5
300 : 36.5
400 : 36.5
500 : 36.5
600 : 36.5
700 : 36.5
800 : 36.5
900 : 36.5
1000 : 36.5
1100 : 36.5
1200 : 36.5
1300 : 36.5
1400 : 36.5
1500 : 36.5
1600 : 36.5
1700 : 36.5
1800 : 36.5
1900 : 36.5
2000 : 36.5
2100 : 36.5
2200 : 36.5
2300 : 36.5
2400 : 36.5
2500 : 36.5
stderr
"Global garbage collection... done"