Subject: Re: printf() using floating point ...
To: Chris G Demetriou <>
From: Andrew Cagney <>
List: tech-kern
Date: 06/15/1995 12:04:08
Excerpts from mail: 14-Jun-95 Re: printf() using floating.. Chris G
Demetriou@lagavu (935)

> I'd definitely like to see such numbers, for a couple of different
> processors, before this was jumped into.

(Using the back of a spare envelope ...)

Lets make some rash assumptions:

	o	all the data has to come from/to memory
	o	the memory path is (8bytes @ 70ns or 70*10^-9)
	o	 we ignore things like writeback caches stalls etc
	o	32 double precision fp registers.

First how much data is being moved ...

	user -> kernel
		save 32*8 bytes, restore 32*8 bytes
	kernel -> user


	4*32*8 bytes
or	4*32*8 / 8 = 128 lines of data

Using the above, this takes:

	128 * 70ns ~= 8960*10^-9 or ~ 10*10^-6

doesn't look like much.  How does it compare to the frequence of a
context switch.