On Thu, 8 Sep 2011, Allin Cottrell wrote:

> [...] The operation Artur mentions, namely assigning a 
> scalar value to a single element of a matrix, is a special 
> case of assignment to a sub-matrix, which has the general 
> form:
>
> M[r1:r2,c1:c2] = <expression>
>
> where the r's and c's are expressions that evaluate to row 
> and column indices. This demands a lot more parsing effort 
> than assigning a scalar value to a place in a series (where 
> the only valid specifier on the left is a single observation 
> number).
>
> We could maybe write a dedicated, faster function for the 
> special case, but even then we first have to figure out that 
> we're actually in that special case.

In fact quite a nice speed-up was available here. Things 
should look better in current CVS.

Allin

Reply via email to