[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #31709] simple routine which runs 20 times slo
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #31709] simple routine which runs 20 times slower on octave vs. matlab! |
Date: |
Sat, 20 Nov 2010 17:23:07 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.12) Gecko/20101027 Ubuntu/9.10 (karmic) Firefox/3.6.12 |
Update of bug #31709 (project octave):
Open/Closed: Open => Closed
_______________________________________________________
Follow-up Comment #1:
See Appendix C.2 "Tips for Making Code Run Faster" in the Octave
documentation. In general, you should avoid loops and vectorize the code.
Matlab itself also has a very good reference on getting code to run faster
(http://www.mathworks.com/help/techdoc/matlab_prog/f8-784135.html).
>From a cursory glance, I would try the following
1) Vectorize the inner loop.
2) Pre-allocate return arrays such as v to avoid repeated memory
allocations.
3) Use optimized library functions, such as find, rather than writing your
own code to search through vectors.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?31709>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #31709] simple routine which runs 20 times slower on octave vs. matlab!, kody law, 2010/11/19
- [Octave-bug-tracker] [bug #31709] simple routine which runs 20 times slower on octave vs. matlab!,
Rik <=
- [Octave-bug-tracker] [bug #31709] simple routine which runs 20 times slower on octave vs. matlab!, kody law, 2010/11/20
- [Octave-bug-tracker] [bug #31709] simple routine which runs 20 times slower on octave vs. matlab!, Søren Hauberg, 2010/11/20
- [Octave-bug-tracker] [bug #31709] simple routine which runs 20 times slower on octave vs. matlab!, kody law, 2010/11/20
- [Octave-bug-tracker] [bug #31709] simple routine which runs 20 times slower on octave vs. matlab!, Søren Hauberg, 2010/11/21
- [Octave-bug-tracker] [bug #31709] simple routine which runs 20 times slower on octave vs. matlab!, kody law, 2010/11/21
- [Octave-bug-tracker] [bug #31709] simple routine which runs 20 times slower on octave vs. matlab!, Rik, 2010/11/21
- [Octave-bug-tracker] [bug #31709] simple routine which runs 20 times slower on octave vs. matlab!, kody law, 2010/11/21