On Mon, Jun 12, 2006 at 02:11:19PM +0200, Iljitsch van Beijnum wrote:
> The problem with text is that you have to walk through memory and  
> compare characters. A LOT.

That's not where your code spends its time.

Run gprof(1).  The majority of time your code spends is spent doing the
2 integer divides per text to integer conversion and in strtoimax
(called by fscanf). 

Multiplying or dividing is the worst thing you can do on a CPU in
general.  

-- 
Ted Faber
http://www.isi.edu/~faber           PGP: http://www.isi.edu/~faber/pubkeys.asc
Unexpected attachment on this mail? See http://www.isi.edu/~faber/FAQ.html#SIG

Attachment: pgpKs4KugT1BN.pgp
Description: PGP signature

_______________________________________________
Ietf mailing list
Ietf@ietf.org
https://www1.ietf.org/mailman/listinfo/ietf

Reply via email to