I've got a feeling that speed of object creation seems to have improved recently - perhaps it's my old mind playing tricks on me. With the following code
/* class experimental.classbase */
CLASS experimental.ClassBase:
DEF PROTECTED PROPERTY foo AS CHAR NO-UNDO GET. PRIVATE SET.
END CLASS.
and this test program
DEF VAR a AS CLASS experimental.classbase NO-UNDO.
DEF VAR i AS INT NO-UNDO.
ETIME (YES).
DO i = 1 TO 100000:
a = NEW experimental.classbase().
END.
MESSAGE ETIME VIEW-AS ALERT-BOX.
I've got consistent timings of 6000 ms. Not super super hot, I agree - but 100,000 new objects in 6s seems a lot faster than the "old" days
Environment: Windows 7 64 bit, 8GB ram Intel core7 860 @ 2.8, 10.2B03
hmm. Thinking about it, this may be because I got a new box a year or so ago, and just haven't run this kind of test since.
Anyway, if others could test this on earlier versions of progress that would be interesting.
ta!
Anyway, if others could test this on earlier versions of progress that would be interesting.
10.1C04 (I've added a delete object here in the loop due to the lack of GC): 7.2 sec
10.2A: 7.4 sec including DELETE object, 7.3 sec without.
10.2B03: 6.9 sec, not really showing a difference with or without the delete object
The same code (no delete object) started with -q runs at 1.3 seconds, 10.2B03. I didn't test -q on the earlier versions.
On a Core2 Quad Q9550 @ 2.83GHz, results are average of three runs. So I'd say 10.2B is a bit faster than earlier versions - but not in a range you'd see without a stop watch... One core of your i7 is faster than a single core of the Core2. That's expected.
But the real shot gives -q. Always surprising, but good to know. Should be the default for each runtime.
you know, I *always* forget about the -q . Thanks for reminding me.
you know, I always forget about the -q . Thanks for reminding me.
You are not alone.