dbTalk Databases Forums  

Re: Why is it so slow ?

comp.databases.progress comp.databases.progress


Discuss Re: Why is it so slow ? in the comp.databases.progress forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
stefan.lang@t-online.de
 
Posts: n/a

Default Re: Why is it so slow ? - 09-14-2003 , 12:10 PM






On Sat, 13 Sep 2003 21:39:47 +0200, "Jérôme Delacotte"
<challengejs (AT) free (DOT) fr> wrote:

Quote:
Why the code :

do i = 1 to 100000 :
End.

Is so slow ? Near 2 secondes !


In which environment ? PROGRESS 6 on DOS or PROGRESS 9 on a 8
processor HP-UX ?



Reply With Quote
  #2  
Old   
wrpkm
 
Posts: n/a

Default Re: Why is it so slow ? - 09-14-2003 , 05:58 PM







Was your variable declared with no-undo?



if no-undo was not used then the loop becomes part of a transaction.


--
Posted via http://dbforums.com

Reply With Quote
  #3  
Old   
Bernd Felsche
 
Posts: n/a

Default Re: Why is it so slow ? - 09-14-2003 , 07:49 PM



"Jérôme Delacotte" <challengejs (AT) free (DOT) fr> writes:

Quote:
stefan.lang (AT) t-online (DOT) de> a écrit dans le message de news:
5589mvcr9r6b6bmgbl6dhfsh44bk3u5l5q (AT) 4ax (DOT) com...
On Sat, 13 Sep 2003 21:39:47 +0200, "Jérôme Delacotte"
challengejs (AT) free (DOT) fr> wrote:

Why the code :

do i = 1 to 100000 :
End.

Is so slow ? Near 2 secondes !
Try "no-undo" qualifier on the declaration of "i".

Quote:
In which environment ? PROGRESS 6 on DOS or PROGRESS 9 on a 8
processor HP-UX ?

On every OS it is slow ! (I use Linux V8)

I compare with C routine !

In C the same Code is 6000 or 10000 quicker
It's optimised to nothing. Infinitely faster.

Quote:
A+
--
/"\ Bernd Felsche - Innovative Reckoning, Perth, Western Australia
\ / ASCII ribbon campaign | I'm a .signature virus!
X against HTML mail | Copy me into your ~/.signature
/ \ and postings | to help me spread!


Reply With Quote
  #4  
Old   
Joe Camel
 
Posts: n/a

Default Re: Why is it so slow ? - 09-14-2003 , 09:14 PM



Jérôme,

Unlike P4GL, the C compiler is most likely recognizing that the do block is
empty and that it can be replaced with "i = 100001", the final value of i.

Regardless of validity of above, the P4GL is definately at lease one or more
orders of magnitude SLOWER than native executables.

However, very little time is spent doing native execution while waiting for
disk drive heads to move while they are reading and/or writing your data.

Joe

"Jérôme Delacotte" <challengejs (AT) free (DOT) fr> wrote

Quote:
On every OS it is slow ! (I use Linux V8)

I compare with C routine !

In C the same Code is 6000 or 10000 quicker

A+

stefan.lang (AT) t-online (DOT) de> a écrit dans le message de news:
5589mvcr9r6b6bmgbl6dhfsh44bk3u5l5q (AT) 4ax (DOT) com...
On Sat, 13 Sep 2003 21:39:47 +0200, "Jérôme Delacotte"
challengejs (AT) free (DOT) fr> wrote:

Why the code :

do i = 1 to 100000 :
End.

Is so slow ? Near 2 secondes !



In which environment ? PROGRESS 6 on DOS or PROGRESS 9 on a 8
processor HP-UX ?






Reply With Quote
  #5  
Old   
Grzegorz Kalin'ski
 
Posts: n/a

Default Re: Why is it so slow ? - 09-15-2003 , 02:36 AM





stefan.lang (AT) t-online (DOT) de wrote:
Quote:
On Sat, 13 Sep 2003 21:39:47 +0200, "Jérôme Delacotte"
challengejs (AT) free (DOT) fr> wrote:


Why the code :

do i = 1 to 100000 :
End.

Is so slow ? Near 2 secondes !




In which environment ? PROGRESS 6 on DOS or PROGRESS 9 on a 8
processor HP-UX ?

Hi.

IMHO

DO i = 1 to 100000:
END.

is a single transaction, so it does not matter if You
use or not the NO-UNDO

REPEAT i = 1 to 100000:
END.
is a 1000000 transactions:

/* TEST 1: REPEAT & NO-UNDO*/

repeat:
if etime(yes) = 0 then.
def var i as int no-undo.
repeat i = 1 to 100000: end.
disp etime(yes).
end.

1.960
1.551
1.381
1.443
1.503
1.429
1.388
1.715
.....

/* test 2: REPEAT */

repeat:
if etime(yes) = 0 then.
def var i as int.
repeat i = 1 to 100000: end.
disp etime(yes).
end.


1.483
1.554
1.625
1.375
1.375
1.539
1.391
.....

/* test 3: DO */
repeat:
if etime(yes) = 0 then.
def var i as int.
do i = 1 to 100000: end.
disp etime(yes).
end.

1.236
1.239
1.349
1.242
1.357
1.248
1.241
.....

/* test 4: DO & NO-UNDO */
repeat:
if etime(yes) = 0 then.
def var i as int NO-UNDO.
do i = 1 to 100000: end.
disp etime(yes).
end.

1.246
1.256
1.237
1.234
1.234
1.238
1.236
1.234
.....

IMHO:
1. NO-UNDO does not matter when DO is used.
It does matter (20-30% faster) when REPEAT is used.
2. DO is a single transaction,
3. REPEAT is a multiple transactions.
4. Progress 4GL is not a language for math operation, but
for databases. These 1.5 seconds does not matter when
4GL is used for normal database processing.

TESTED ON: RS/6000 B50 running AIX 4.3.1.0 PRGS 8.3E02
with regards



Reply With Quote
  #6  
Old   
ranger
 
Posts: n/a

Default Re: Why is it so slow ? - 09-15-2003 , 09:11 AM



what are you talking about ? progress is interpreted not compiled !
it's 4gl, what did you expect ?

progress compiles code into action cells that drives an interpreter
unlike c that compiles code into actual machine code

Reply With Quote
  #7  
Old   
ranger
 
Posts: n/a

Default Re: Why is it so slow ? - 09-16-2003 , 04:43 PM



yeah ! i didn't get an a+ for a long time

just curious, what are you writting that you have to fight over

every millisecond ? is it something to do with graphics ? any how good luck !

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.