Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: New competition: do you accept the challenge?! :-)

From: ale870:gm:ail at: 7-Nov-2007 0:10

Ok guys, we started very well First of all: thank you Sunanda for your tricks! My Rebol application gained many precious seconds (from 16 secs to 11 secs). Then I tried to split a single "insert tail reduce" in different lines (without reduce), but I didn't gain time, instead I lost some seconds (from 11 secs to 15 secs). Tom, I was very impressed from your code, but it seems the result is not identical (try to print "finale" in every external loop, in the original code and in your code, the result is very similar but not identical). However, your code takes only 8 secs. If you can fix such issue, It seems a very good script! :-) I was impressed even by Hallvard results: it seems Rebol for Mac is fairly not optimized! I think Carl and co. should carefully consider this fact, don't you think? On Nov 6, 2007 11:32 PM, Hallvard Ystad <hallvard.ystad-babelserver.org> wrote:
> Sorry not to advance the rebol code in any manner, but here are some > results > with your initial code from two other machines: > > Windows XP SP2, Pentium D 3GhZ, 3G RAM: > Rebol code: 16 seconds > Java code: 3,5 seconds > > Mac PPC, OS 10.4, old machine: > Rebol: 01:27 (!) > Java: 17,8 seconds > > Good luck to contestants! > > HY > > Dixit Alessandro Manotti (22.51 06.11.2007): > >Hi, > > > >today I was checking Rebol performance vs Java. > >So, my first test was some calculation tests. Performance were > comparable! > >(I like it!!!). > > > >Then I made some strings peformance tests. In this case I got bad > results. > >Infact, it seems Java is REALLY FASTER than Rebol :-( > > > >So, my competion proposal is the following: creating a Rebol application > >faster than the corresponding java one. > > > >This is the java program (very easy): > > > > >===================== > > ===================== > ============= > > > >public class Prova1 { > > public Prova1() { > > System.out.println("START..."); > > > > StringBuffer finale = new StringBuffer(); > > > > for(int i=1; i<10001; i++) { > > StringBuffer str = new StringBuffer(); > > for(int j=1; j<501; j++) { > > str.append(String.valueOf(i)).append(",").append( > >String.valueOf(j)).append("-"); > > } > > > > finale.append(str.substring(1, 5)); > > > > } > > > > System.out.println("COMPLETED!!!"); > > System.out.println(finale.toString()); > > System.out.println(finale.length()); > > } > > > > public static void main(String[] args) { > > new Prova1(); > > } > >} > > > > >===================== > > ===================== > ============= > > > >rebol [] > > > >print "START..." > >s1: now > > > >str: make string! 1000 > >finale: make string! 10000 > > > >repeat i 10000 [ > > clear str > > > > repeat j 500 [ > > append str reduce [i "," j "-"] > > ] > > > > append finale copy/part skip str 1 4 > >] > > > >print "STOP!" > >print length? finale > >print (now/time - s1/time) > > > >halt > > > > >===================== > > ===================== > ============= > > > >Can you optimize it in order to make it faster? > > > >Just for curiosity. I have a notebook HP nc6320, Dual Core with 2Gb ram. > >Performance results are: > > > >Java application: 5 seconds. > >Rebol application: 16 seconds > > > >And now... the competion begins!!!! > > > >As I made in the previous competion, I will publish the results in my > site > >(it will be a good tutorial for the beginners!!!) > >Site (for Rebol desktop) is: http://sguish.50webs.org/index.r > > > >(I'm sorry, some items are in Italian language, since I maintain the site > >and a blog for italian people). > > > >Thank you! > > > > > > > > > >-- > > > >//Alessandro > > > >http://sguish.wordpress.com > >http://laccio.wordpress.com > > > > > >-- > >To unsubscribe from the list, just send an email to > >lists at rebol.com with unsubscribe as the subject. > > Pr=E6tera censeo Carthaginem esse delendam > > -- > To unsubscribe from the list, just send an email to > lists at rebol.com with unsubscribe as the subject. >
-- //Alessandro http://sguish.wordpress.com http://laccio.wordpress.com