Re: [eigen] Indexes: why signed instead of unsigned?

[ Thread Index | Date Index | More Archives ]

On Tue, 11 May 2010, Benoit Jacob wrote:

What about the other debate, between int (32bit) and ptrdiff_t (same
size as void*) ?

A disadvantage of the potentially bigger ptrdiff_t is that it costs more memory. I guess this is usually not an issue, but it does make a difference for sparse matrices. In fact, we earlier had somebody who wanted to use 16-bit instead of 32-bit for this reason:

The performance hit of using 64-bit indices may not be so big, but we never had somebody complain about eigen using only 32-bit indices. And on a practical note, it seems rather short before the planned beta tagging to make such a radical change.

No opinion on the signed/unsigned debate.


Mail converted by MHonArc 2.6.19+