summaryrefslogtreecommitdiffstats
path: root/libdimension/bench/array.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2014-06-07 16:58:20 -0400
committerTavian Barnes <tavianator@tavianator.com>2014-06-07 16:58:20 -0400
commita22560c3ccaf19261b5c40fdcab36d2d22426986 (patch)
tree85a39e016ac972f54e282eedcf32b26da6f67822 /libdimension/bench/array.c
parentbfadc2ee359f10842da21336795e54f24a2746e3 (diff)
downloaddimension-a22560c3ccaf19261b5c40fdcab36d2d22426986.tar.xz
Use // comments when possible.
Diffstat (limited to 'libdimension/bench/array.c')
-rw-r--r--libdimension/bench/array.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/libdimension/bench/array.c b/libdimension/bench/array.c
index 3fe0c83..b48a03f 100644
--- a/libdimension/bench/array.c
+++ b/libdimension/bench/array.c
@@ -34,7 +34,7 @@ main(void)
return EXIT_FAILURE;
}
- /* Benchmark allocation and deallocation */
+ // Benchmark allocation and deallocation
dmnsn_array *array;
sandglass_bench_fine(&sandglass, {
array = dmnsn_new_array(sizeof(object));
@@ -42,10 +42,10 @@ main(void)
});
printf("dmnsn_new_array() + dmnsn_delete_array(): %ld\n", sandglass.grains);
- /* Create our test array */
+ // Create our test array
array = dmnsn_new_array(sizeof(object));
- /* dmnsn_array_push() */
+ // dmnsn_array_push()
printf("dmnsn_array_push():");
@@ -55,25 +55,25 @@ main(void)
}
printf("\n");
- /* dmnsn_array_get() */
+ // dmnsn_array_get()
sandglass_bench_fine(&sandglass, dmnsn_array_get(array, count/2, &object));
printf("dmnsn_array_get(): %ld\n", sandglass.grains);
- /* dmnsn_array_set() */
+ // dmnsn_array_set()
sandglass_bench_fine(&sandglass, dmnsn_array_set(array, count/2, &object));
printf("dmnsn_array_set(): %ld\n", sandglass.grains);
- /* dmnsn_array_at() */
+ // dmnsn_array_at()
void *ptr;
sandglass_bench_fine(&sandglass, ptr = dmnsn_array_at(array, count/2));
printf("dmnsn_array_at() = %p: %ld\n", ptr, sandglass.grains);
- /* dmnsn_array_size() */
+ // dmnsn_array_size()
size_t size;
sandglass_bench_fine(&sandglass, size = dmnsn_array_size(array));
printf("dmnsn_array_size() = %zu: %ld\n", size, sandglass.grains);
- /* dmnsn_array_resize() */
+ // dmnsn_array_resize()
dmnsn_array_resize(array, count);
sandglass_bench_noprecache(&sandglass, dmnsn_array_resize(array, count * 2));
printf("dmnsn_array_resize(): %ld", sandglass.grains);
@@ -81,7 +81,7 @@ main(void)
sandglass_bench_noprecache(&sandglass, dmnsn_array_resize(array, count));
printf(" %ld\n", sandglass.grains);
- /* dmnsn_array_insert() */
+ // dmnsn_array_insert()
printf("dmnsn_array_insert():");
@@ -92,7 +92,7 @@ main(void)
}
printf("\n");
- /* dmnsn_array_remove() */
+ // dmnsn_array_remove()
printf("dmnsn_array_remove():");
@@ -103,7 +103,7 @@ main(void)
}
printf("\n");
- /* dmnsn_array_pop() */
+ // dmnsn_array_pop()
printf("dmnsn_array_pop():");