hi,

this is a surprise for me that in gcc
a 16 cell array compared cell by cell such as

1. if (a[1]==b[1] && a[2]==b[2] && ..... a[16]==b[16]) ....
is **faster** than 
2. memcmp(a,b,16) !!!!

a program that does about 20! (factorial) checks like this gives these
times...
1.23 seconds for if statements
1.76 seconds for memcmp !!

is this normal?

i did read about memcmp performance issues of gcc in old pentiums
(though mine is an athlon) but are they "so" slow? 
secondly, i thought "if" were the slowest things ever in the c language
!!

any comments..!?

p.s: mine is a gentoo compiled from stage1, so i guess the pentiumII
issue shouldnt be there ... just a guess!

robins


_______________________________________________
ilugd mailing list
[EMAIL PROTECTED]
http://frodo.hserus.net/mailman/listinfo/ilugd

Reply via email to