MCPcopy Index your code
hub / github.com/apache/groovy / main

Method main

benchmark/bench/nsieve.java:37–51  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

35 }
36
37 public static void main(String[] args)
38 {
39 int n = 2;
40 if (args.length > 0) n = Integer.parseInt(args[0]);
41 if (n < 2) n = 2;
42
43 int m = (1<<n)*10000;
44 boolean[] flags = new boolean[m+1];
45
46 System.out.println("Primes up to " + padNumber(m, 8) + " " + padNumber(nsieve(m,flags), 8));
47 m = (1<<n-1)*10000;
48 System.out.println("Primes up to " + padNumber(m, 8) + " " + padNumber(nsieve(m,flags), 8));
49 m = (1<<n-2)*10000;
50 System.out.println("Primes up to " + padNumber(m, 8) + " " + padNumber(nsieve(m,flags), 8));
51 }
52}

Callers

nothing calls this directly

Calls 4

padNumberMethod · 0.95
nsieveMethod · 0.95
parseIntMethod · 0.80
printlnMethod · 0.45

Tested by

no test coverage detected