private static TensorType vectorType(TensorType.Builder builder, String name, TensorType.Dimension.Type type, int size) {
        switch (type) {
            case mapped:
                builder.mapped(name);
                break;
            case indexedUnbound:
                builder.indexed(name);
                break;
            case indexedBound:
                builder.indexed(name, size);
                break;
            default:
                throw new IllegalArgumentException("Dimension type " + type + " not supported");
        }
        return builder.build();
    }
Microbenchmark of tensor operations.

@author bratseth
vespajlib/src/test/java/com/yahoo/tensor/TensorFunctionBenchmark.java