Ejemplo n.º 1
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
Ejemplo n.º 2
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
Ejemplo n.º 3
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
Ejemplo n.º 4
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