logo       

[jira] Commented: (BOO-484) For loop similar to Basic's for <var> = <start>: msg#00114

lang.boo.devel

Subject: [jira] Commented: (BOO-484) For loop similar to Basic's for <var> = <start> to <end> [step <step>]:

[ http://jira.codehaus.org/browse/BOO-484?page=comments#action_47425 ]

Cameron Kenneth Knight commented on BOO-484:
--------------------------------------------

Check BOO-137 for the solution to the optimization of the for i in range loop.

> For loop similar to Basic's for <var> = <start> to <end> [step <step>]:
> -----------------------------------------------------------------------
>
> Key: BOO-484
> URL: http://jira.codehaus.org/browse/BOO-484
> Project: Boo
> Type: New Feature
> Environment: All
> Reporter: Cameron Kenneth Knight
> Priority: Minor

>
>
> Boo's current for loop with range is much slower than C#'s simpler for loop
> If we were to go with Basic's syntax of
> for <var> = <start> to <end> [step <step>]:
> <block>
> Which, would give the same result as
> for <var> in range(<start>, <end>[, <step>]):
> <block>
> but could be made a lot faster.
> I ran a test where I, in C#, iterated through a for loop 1,000,000,000 times,
> taking 1.75 seconds.
> I then ran a test in Boo that iterated through its for loop using range
> 1,000,000,000 times, taking 47.58 seconds.
> I don't know if there is another way to make the for-range statement faster,
> but the way I proposed can cut out the enumerator altogether.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise