Esempio n. 1
0
def benchmark_stdev(ctx, timer):
    FLAGS.opt_expression_cache = False
    sigma = stdev(S.ndarray((N,)))
    sigma.evaluate()

    test_common.benchmark_op(lambda: sigma.evaluate())
    FLAGS.opt_expression_cache = True
Esempio n. 2
0
def benchmark_stdev(ctx, timer):
    FLAGS.opt_expression_cache = False
    sigma = stdev(S.ndarray((N, )))
    sigma.evaluate()

    test_common.benchmark_op(lambda: sigma.evaluate())
    FLAGS.opt_expression_cache = True
Esempio n. 3
0
def benchmark_pearson(ctx, timer):
    FLAGS.opt_expression_cache = False
    X = S.ndarray((N,))
    Y = S.ndarray((N,))

    c = pearson_coeff(X, Y)
    c.evaluate()

    test_common.benchmark_op(lambda: c.evaluate())
    FLAGS.opt_expression_cache = True
Esempio n. 4
0
def benchmark_pearson(ctx, timer):
    FLAGS.opt_expression_cache = False
    X = S.ndarray((N, ))
    Y = S.ndarray((N, ))

    c = pearson_coeff(X, Y)
    c.evaluate()

    test_common.benchmark_op(lambda: c.evaluate())
    FLAGS.opt_expression_cache = True