nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge: nitunit: Use markdown2
[nit.git]
/
tests
/
bench_nsieve_bool.nit
diff --git
a/tests/bench_nsieve_bool.nit
b/tests/bench_nsieve_bool.nit
index
4adb225
..
a5e13ce
100644
(file)
--- a/
tests/bench_nsieve_bool.nit
+++ b/
tests/bench_nsieve_bool.nit
@@
-14,7
+14,7
@@
# See the License for the specific language governing permissions and
# limitations under the License.
# See the License for the specific language governing permissions and
# limitations under the License.
-meth nsieve(n: Int): Int
+fun nsieve(n: Int): Int
do
var count = n-2
var array = new Array[Bool].with_capacity(n)
do
var count = n-2
var array = new Array[Bool].with_capacity(n)
@@
-36,13
+36,13
@@
do
return count
end
return count
end
-meth test(n: Int)
+fun test(n: Int)
do
do
- var m = 10000.lshift(n)
+ var m = 1000 << n
print("Primes up to {m} {nsieve(m)}")
end
print("Primes up to {m} {nsieve(m)}")
end
-var n = 2
+var n = 3
if args.length == 1 then
n = args.first.to_i
end
if args.length == 1 then
n = args.first.to_i
end