|
[jira] Commented: (BOO-484) For loop similar to Basic's for <var> = <start>: msg#00114lang.boo.devel
[ 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> |
|---|---|---|
| Previous by Date: | [jira] Commented: (BOO-137) optimize for item in array construct, Cameron Kenneth Knight (JIRA) |
|---|---|
| Next by Date: | [jira] Created: (BOO-500) self(index) instead of [DefaultMember(Item)] Item(index), Cameron Kenneth Knight (JIRA) |
| Previous by Thread: | [jira] Commented: (BOO-484) For loop similar to Basic's for <var> = <start> to <end> [step <step>]:, Cameron Kenneth Knight (JIRA) |
| Next by Thread: | [jira] Created: (BOO-485) Allow using constants / other enum values as values for enum members, Daniel Grunwald (JIRA) |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |