On Wednesday, 1 April 2015 at 13:52:06 UTC, tchaloupka wrote:
C#:
PNG load - 90ms
PNG flip - 10ms
PNG save - 380ms
D using dlib (http://code.dlang.org/packages/dlib):
PNG load - 500ms
PNG flip - 30ms
PNG save - 950ms
D using imageformats
(http://code.dlang.org/packages/imageformats):
PNG load -
On 3/04/2015 4:27 a.m., John Colvin wrote:
On Thursday, 2 April 2015 at 11:49:44 UTC, Rikki Cattermole wrote:
On 3/04/2015 12:29 a.m., John Colvin wrote:
On Thursday, 2 April 2015 at 09:55:15 UTC, Rikki Cattermole wrote:
On 2/04/2015 10:47 p.m., Rikki Cattermole wrote:
On 2/04/2015 2:52 a.m.,
On Wednesday, 1 April 2015 at 14:00:52 UTC, bearophile wrote:
If you have to perform performance benchmarks then use ldc or
gdc.
Also disable bound tests with your compilation switches.
Add the usual pure/nothrow/@nogc/@safe annotations where you
can (they don't increase speed much, usually).
On Thursday, 2 April 2015 at 11:49:44 UTC, Rikki Cattermole wrote:
On 3/04/2015 12:29 a.m., John Colvin wrote:
On Thursday, 2 April 2015 at 09:55:15 UTC, Rikki Cattermole
wrote:
On 2/04/2015 10:47 p.m., Rikki Cattermole wrote:
On 2/04/2015 2:52 a.m., tchaloupka wrote:
Hi,
I have a bunch of sq
On 3/04/2015 12:29 a.m., John Colvin wrote:
On Thursday, 2 April 2015 at 09:55:15 UTC, Rikki Cattermole wrote:
On 2/04/2015 10:47 p.m., Rikki Cattermole wrote:
On 2/04/2015 2:52 a.m., tchaloupka wrote:
Hi,
I have a bunch of square r16 and png images which I need to flip
horizontally.
My flip
On Thursday, 2 April 2015 at 09:55:15 UTC, Rikki Cattermole wrote:
On 2/04/2015 10:47 p.m., Rikki Cattermole wrote:
On 2/04/2015 2:52 a.m., tchaloupka wrote:
Hi,
I have a bunch of square r16 and png images which I need to
flip
horizontally.
My flip method looks like this:
void hFlip(T)(T[] d
On Thursday, 2 April 2015 at 05:21:08 UTC, thedeemon wrote:
std.algorithm.reverse uses ranges, and shamefully DMD is really
bad at optimizing away range-induced costs.
The specialisation of reverse selected for slices does not use
the range interface, it's all just indexing. The only overheads
On 2/04/2015 10:47 p.m., Rikki Cattermole wrote:
On 2/04/2015 2:52 a.m., tchaloupka wrote:
Hi,
I have a bunch of square r16 and png images which I need to flip
horizontally.
My flip method looks like this:
void hFlip(T)(T[] data, int w)
{
import std.datetime : StopWatch;
StopWatch sw;
On 2/04/2015 2:52 a.m., tchaloupka wrote:
Hi,
I have a bunch of square r16 and png images which I need to flip
horizontally.
My flip method looks like this:
void hFlip(T)(T[] data, int w)
{
import std.datetime : StopWatch;
StopWatch sw;
sw.start();
foreach(int i; 0..w)
{
std.algorithm.reverse uses ranges, and shamefully DMD is really
bad at optimizing away range-induced costs.
On Wednesday, 1 April 2015 at 16:08:14 UTC, John Colvin wrote:
On Wednesday, 1 April 2015 at 13:52:06 UTC, tchaloupka wrote:
I'm pretty sure that the flipping happens in GDI+ as well. You
might be writing C#, but the code your calling that's doing all
the work is C and/or C++, quite possibly
On Wednesday, 1 April 2015 at 14:00:52 UTC, bearophile wrote:
tchaloupka:
Am I doing something utterly wrong?
If you have to perform performance benchmarks then use ldc or
gdc.
I tried it on my slower linux box (i5-2500K vs i7-2600K) without
change with these results:
C# (mono with it
On Wednesday, 1 April 2015 at 13:52:06 UTC, tchaloupka wrote:
I'm pretty sure that the flipping happens in GDI+ as well. You
might be writing C#, but the code your calling that's doing all
the work is C and/or C++, quite possibly carefully optimised over
many years by microsoft.
Are you eve
tchaloupka:
Am I doing something utterly wrong?
If you have to perform performance benchmarks then use ldc or gdc.
Also disable bound tests with your compilation switches.
Sometimes reverse() is not efficient, I think, it should be
improved. Try to replace it with a little function written
Hi,
I have a bunch of square r16 and png images which I need to flip
horizontally.
My flip method looks like this:
void hFlip(T)(T[] data, int w)
{
import std.datetime : StopWatch;
StopWatch sw;
sw.start();
foreach(int i; 0..w)
{
auto row = data[i*w..(i+1)*w]
15 matches
Mail list logo