octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Efficiency in 13980:bd2be36fd949


From: John W. Eaton
Subject: Efficiency in 13980:bd2be36fd949
Date: Sat, 3 Dec 2011 13:45:12 -0500

On  3-Dec-2011, Jordi GutiƩrrez Hermoso wrote:

| I noticed that this change introduces a bit of a needless slowdown:
| 
|     http://hg.savannah.gnu.org/hgweb/octave/rev/bd2be36fd949
| 
| Can you please rephrase the condition so that warn is at the front and
| the short-circuiting avoids the call to unique?
| 
| Sorry I don't do it myself. I don't currently have access to my dev machine.

I could do that, but why should this warning only be issued once per
Octave session?  Shouldn't it be checked for each image?  Given all
the other things that image has to do, does it really represent a large
slowdown if we made the check on each call?

Also, the test is somewhat simplistic.  For example, if I understand
correctly what it is intended to do, it fails for something like

  x = y = (1:100)/5; image (x, y, rand (100, 100, 3))

jwe


reply via email to

[Prev in Thread] Current Thread [Next in Thread]