help-octave
[Top][All Lists]
Advanced

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

Re: why is octave 4.2.0 x86_64-w64-mingw32 so slow?


From: Nicholas Jankowski
Subject: Re: why is octave 4.2.0 x86_64-w64-mingw32 so slow?
Date: Mon, 23 Oct 2017 21:17:14 -0400



>> profshow
   #  Function Attr     Time (s)   Time (%)        Calls
--------------------------------------------------------
  47       log           310.235      24.39        37282
  28       exp           299.600      23.55        74565
   1     train           172.548      13.56            1
  32    repmat           133.316      10.48       149128
  30     fprop           115.611       9.09        37282
  21  binary *            58.261       4.58       819795
  23  binary +            40.484       3.18       670631
  45 binary ./            39.241       3.08       260814
  48 binary .*            25.855       2.03       298032
  18  binary -            22.245       1.75       484284
  46       sum            13.330       1.05       186346
  50    fflush             7.749       0.61        37315
  31 postfix '             7.535       0.59        37282
  27  prefix -             4.467       0.35        74565
  37       max             4.209       0.33       186410
  29   fprintf             3.656       0.29        37707
  35       all             2.251       0.18       447384
  22   reshape             1.546       0.12       372822
  13      size             1.535       0.12       410139
  44      ones             1.265       0.10       298256

>>

Ok, still flying blind here. But that seems like a lot of repmat calls. I seem to recall when working on repelem some people trying to avoid repmat due to it being slow.  If I can find the reference or reason I'll share.  Log and exp seem high, but it really depends on how big a matrix you're calling them on.

I'd recommend trying profexplore and diving down to each function call. It may show you which parts of your program are more expensive and you can focus your optimization efforts.


reply via email to

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