def main(*args):
    n = 128
    iterations = 10
    dt = 0.01667

    if len(args) > 0:
        n = int(args[0])
        if len(args) > 1:
            iterations = int(args[1])

    pin = np.zeros((n, 4))
    pout = np.zeros((n, 4))
    v = np.zeros((n, 4))

    randomize_bodies(pin, v, 1.54, 8.0, n)

    check_correctness(pin, pout, v, dt, n, integrate, integrate)

    time0 = time.time()
    for i in range(iterations):
        integrate(pout, pin, v, dt, n)
        pin, pout = pout, pin
    time1 = time.time()
    ms = (time1 - time0)*1000
    gf = compute_perf_stats(ms, iterations, n)

    print("%d n-body iterations" % iterations)
    print("%f ms: %f GFLOP/s" % (ms, gf))
dataset/ETHPy150Open numba/numba/examples/nbody/nbody_modified_by_MarkHarris.py/main/original