Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Can this run any faster?
Replies: 36   Last Post: May 9, 2013 12:04 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Elnaz Sadeghian

Posts: 176
From: Tehran, Iran
Registered: 5/26/07
Re: Can this run any faster?
Posted: Apr 10, 2013 3:29 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Thanks Roger; that is a clever substitute. It runs 0.01 second faster than the original one.

Steve:
The code above is an excerpt of BCJR algorithm. It is the forward recursion part which sweeps over the trellis structure from the beginning to the end in forward direction.
It is difficult to explain in words what that excerpt is trying to do for the general audience since it requires a lot of backgroun math to set the scene.

I have another loop similar to the first one which is a backward recursion. It starts from the end working its way to the beginning:

% Backwards recursion
b=zeros(16,length);
b=b-inf;
b(1,length)=0;
for i= length-1:-1:1
for j= 1:32
A = b(transitions(j,1),i);
B = b(transitions(j,2),i+1) + ug (j, i+1) + eg(j, i+1);
if(A == -inf && B == -inf)
b(transitions(j,1),i) = -inf;
else
b(transitions(j,1),i)= max(A,B) + log(1+exp(-abs(A-B)));
end
end
end

If I apply Roger's idea I get 0.02 sec improvement in one calling. However, the main problem that costs time here is the big length of the signal (the variable i here).
But thanks Roger, that was clever.


Date Subject Author
4/9/13
Read Can this run any faster?
Elnaz Sadeghian
4/10/13
Read Re: Can this run any faster?
Roger Stafford
4/10/13
Read Re: Can this run any faster?
dpb
4/10/13
Read Re: Can this run any faster?
Roger Stafford
4/10/13
Read Re: Can this run any faster?
Elnaz Sadeghian
4/10/13
Read Re: Can this run any faster?
Elnaz Sadeghian
4/10/13
Read Re: Can this run any faster?
Bruno Luong
4/10/13
Read Re: Can this run any faster?
Elnaz Sadeghian
4/10/13
Read Re: Can this run any faster?
EBS
4/10/13
Read Re: Can this run any faster?
Bruno Luong
4/10/13
Read Re: Can this run any faster?
Bruno Luong
4/11/13
Read Re: Can this run any faster?
Bruno Luong
4/11/13
Read Re: Can this run any faster?
Bruno Luong
4/10/13
Read Re: Can this run any faster?
Steven Lord
4/10/13
Read Re: Can this run any faster?
Bruno Luong
4/11/13
Read Re: Can this run any faster?
Robert Miethe
4/11/13
Read Re: Can this run any faster?
Yair Altman
4/11/13
Read Re: Can this run any faster?
EBS
4/11/13
Read Re: Can this run any faster?
Bruno Luong
4/11/13
Read Re: Can this run any faster?
Steven Lord
4/11/13
Read Re: Can this run any faster?
Bruno Luong
4/11/13
Read Re: Can this run any faster?
Bruno Luong
4/11/13
Read Re: Can this run any faster?
Steven Lord
4/12/13
Read Re: Can this run any faster?
Roger Stafford
4/12/13
Read Re: Can this run any faster?
Bruno Luong
4/12/13
Read Re: Can this run any faster?
Roger Stafford
4/13/13
Read Re: Can this run any faster?
Bruno Luong
4/13/13
Read Re: Can this run any faster?
Bruno Luong
4/13/13
Read Re: Can this run any faster?
Bruno Luong
4/13/13
Read Re: Can this run any faster?
Bruno Luong
4/13/13
Read Re: Can this run any faster?
Bruno Luong
4/14/13
Read Re: Can this run any faster?
Roger Stafford
4/14/13
Read Re: Can this run any faster?
Bruno Luong
5/8/13
Read Re: Can this run any faster?
Elnaz Sadeghian
5/8/13
Read Re: Can this run any faster?
Marc
5/9/13
Read Re: Can this run any faster?
Bruno Luong
5/9/13
Read Re: Can this run any faster?
Elnaz Sadeghian

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.