Re: [eigen] Signed or unsigned indexing |
[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]
- Once the war of signed/unsigned comes to an end, there is also the problem of 32/64 bits integers on a 64-bit machine. If you have bandwidth problems, or vectorized code, the choice is obvious: use 32-bits indices. But what should you do in other cases? One has to know that when if p is a pointer and k is a 32-bit integer, to get the address of p[k] one need to convert first k to a 64-bit integer. So, you might think that using 64-bit indices is better on x86-64. I even found a very contrived benchmark where it is indeed more efficient. But for almost every code, it just does not make any difference.
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |