Subject: Unrolling write loop in bzero
To: None <port-mips@netbsd.org>
From: Toru Nishimura <nisimura@itc.aist-nara.ac.jp>
List: port-mips
Date: 03/11/1999 17:18:19
Hi.

I'd like to have knowledge about data write bandwidth of various MIPS
implementations.  Goal is to speed up bzero(). 

I have suspiction about the validity of a certain commentation.  In a
file src/lib/libc/arch/mips/string/bzero.S, we can see followings;

       addu    a0, a0, 4               # clear words
       bne     a0, a3, 2b              #  unrolling loop doesnt help
       sw      zero, -4(a0)            #  since we are limited by memory speed

I think the code is derived from either of SPRITE, Mach/pmax or
4.4BSD/pmax, which means the original code was for a peculiar
implementation of (early) R3000 Digital products.

I want to know whether write unrolling does not contribute the bzero()
write performance.  Both of the theories reasoned by hardware
designs/implemenations, and actually performance measurements will be
welcome. 

Tohru Nishimura
Information Technology Centre
Nara Institute of Science and Technology