I Language: New case/in Statement

Posted June 12, 2011 by User 1


There is now a case/in statement in I which is the equivalent of the old case/of statement. Usage is the same as case/of except the of is now in. The new case/of statement does not accept multiple comparisons anymore making the overall comparison run significantly faster than before.

Currently, the case/in statement takes about 80% longer to run than an equivalent if/elif/else series. On the other hand, the case/of statement runs about 2.2% faster than if/elif/else. However, it is still, by far, slower than using a lookup table which is another 30% faster than case/of.

Go to I Language project page
More news from the I Language project.

Go to all projects' news index

Copyrighted © 2007-2023, The Caglow Project.
Material is available under AL.