[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Variable naming in bitset changeset
From: |
Jordi Gutiérrez Hermoso |
Subject: |
Re: Variable naming in bitset changeset |
Date: |
Wed, 16 May 2012 13:37:19 -0400 |
On 16 May 2012 13:02, Rik <address@hidden> wrote:
> When you re-wrote bitset the function definition was changed as shown below:
>
> -function C = bitset (A, n, val)
> +function A = bitset (A, n, val)
[snip]
> If there was a performance reason for making the change then that might
> trump my code clarity concerns.
The only reason is that I didn't want to create a new variable C for
memory usage concerns, so I decided to use A "in-place". Come to
think of it, due to COW semantics, it probably doesn't make a
difference, so feel free to change it back to C and insert `C =
zeros(size(A))' at the appropriate location.
- Jordi G. H.