]> git.imager.perl.org - imager.git/commitdiff
simple benchmark for image copying
authorTony Cook <tony@develop=help.com>
Sun, 6 May 2001 07:33:15 +0000 (07:33 +0000)
committerTony Cook <tony@develop=help.com>
Sun, 6 May 2001 07:33:15 +0000 (07:33 +0000)
bench/copy.bench [new file with mode: 0644]

diff --git a/bench/copy.bench b/bench/copy.bench
new file mode 100644 (file)
index 0000000..045fc46
--- /dev/null
@@ -0,0 +1,10 @@
+#!perl -w
+use Imager qw(:all);
+use Benchmark;
+
+# a basic benchmark to test how much faster it is to work line by line
+$im1 = Imager::ImgRaw::new(200,200,3);
+$im2 = Imager::ImgRaw::new(200,200,3);
+
+timethese(-5,
+       { copy => 'Imager::i_copy($im2, $im1)' });