[REBOL] Re: Profiling Rebol API to DyBASE

2003-12-19 Thread Vos, Doug
Result of latest DocKimbel version on my Dell laptop... >> Elapsed time for adding 20 records 0:00:01.221 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, December 19, 2003 4:58 AM To: [EMAIL PROTECTED] Subject: [REBOL] Re: Profiling Rebol API to DyB

[REBOL] Re: a new switch-like flow-control function

2003-12-19 Thread Joel Neely
Hi, Maxim, There's more to the story, although YMMV... Maxim Olivier-Adlhoch wrote: > > describe: func [x [integer!] y [integer!]] [ > switch true compose [ > (x = 1) ["X is one"] > (y = 1) ["Y is one"] > (x = 2) ["X is two"] > (y =

[REBOL] Re: a new switch-like flow-control function

2003-12-19 Thread Maxim Olivier-Adlhoch
sorry for being late, but note that this works, straight out of the box: describe: func [x [integer!] y [integer!]] [ switch true compose [ (x = 1) ["X is one"] (y = 1) ["Y is one"] (x = 2) ["X is two"] (y = 2) ["Y is two"]

[REBOL] Re: Profiling Rebol API to DyBASE

2003-12-19 Thread Konstantin Knizhnik
Hello Romano, Friday, December 19, 2003, 2:51:19 PM, you wrote: RPT> Hi, RPT> Just seem that clear waste hash table, perhaps this is a bug in clear. Yes, I already noticed it. So it is much cheaper to create new object than clean existed. RPT> These are my tests: >>> i: 10 loop 5 [recy

[REBOL] Re: Profiling Rebol API to DyBASE

2003-12-19 Thread Romano Paolo Tenca
Hi, Just seem that clear waste hash table, perhaps this is a bug in clear. These are my tests: >> i: 10 loop 5 [recycle s: now/precise h: make hash! i * 2 + 2 repeat n i [find h n insert insert tail h n make object! [a: 1] if 99 = (n // 100)[clear h]] print [i difference now/precise s] i:

[REBOL] Optimized version of Rebol ASPI to DyBASE

2003-12-19 Thread Konstantin Knizhnik
New optimized version of Rebol API to DyBASE is available at http://www.garret.ru/~knizhnik/dybase.html I was managed to increase speed of testindex.r example 4 times by optimizing work with hash tables. Unfortunately, the problem is not completely solved and for large number of cached objects, p

[REBOL] Re: Profiling Rebol API to DyBASE

2003-12-19 Thread dockimbel
Hi Konstantin, Here's a version executing 10 times faster. I just changed h series type from hash! to list!. Looks like in your case, cost for adding data is much higher than for searching keys... Regards, -DocKimbel n: 20 h: make list! n l: make block! n start: now/time/precise repeat i