You are calculating array offsets over and over. The fast way to do this in C is more like:
int len; char* pBeg= SvPV(...,len); char* pSrc= pBeg + len; char* pDst= SvPV(....) + len; while( pBeg <= pSrc ) { if( ! *pDst ) { *pDst= *pSrc; } --pSrc; --pDst; }
- tye
In reply to Re^3: Challenge: CPU-optimized byte-wise or-equals (for a meter of beer) (addr math)
by tye
in thread Challenge: CPU-optimized byte-wise or-equals (for a meter of beer)
by dragonchild
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |