From - Thu Jan 29 14:54:42 1998
From: amlaukka@cc.helsinki.fi (Aki M Laukkanen)
Newsgroups: comp.sys.amiga.programmer,de.comp.sys.amiga.misc
Subject: Re: DOOMPORTERS: 040/060 wall slow
Date: 23 Jan 1998 21:20:50 GMT
Organization: University of Helsinki
Lines: 27
Message-ID: <slrn46ci2di.7eb.amlaukka@vesuri.Helsinki.FI>
References: <6ab2iv$61$1@Nordschleife.modem.informatik.tu-muenchen.de>
NNTP-Posting-Host: vesuri.helsinki.fi
X-Newsreader: slrn (0.9.3.2 UNIX)
Path: noticias.ulpgc.es!news.rediris.es!news.belnet.be!jussieu.fr!newsfeed.eerie.fr!news.maxwell.syr.edu!news.idt.net!fci-se!fci!newsfeed.sunet.se!news99.sunet.se!news01.sunet.se!193.166.5.150.MISMATCH!news.funet.fi!news.helsinki.fi!amlaukka
Xref: noticias.ulpgc.es comp.sys.amiga.programmer:76134 de.comp.sys.amiga.misc:10194

In article <6ab2iv$61$1@Nordschleife.modem.informatik.tu-muenchen.de>,
fischerj@informatik.tu-muenchen.de wrote:
>and see the enormous difference between drawing walls on a 320 sized
>screen and a 319 sized screen on 040 or 060.
[the rest clipped]

Yes, this is due to the characteristics and size of the datacache and
the behaviour of the copyback cache operation. Writing vertically is 
generally a very bad thing(tm) with write-allocating copyback caches.
If Doom in mind the width and how high is the wall are keyfactors. The
four-way set-associative nature of the caches mandates the "optimal"
width which shouldn't be a multiple of 16. One particularly bad case 
is a width of 256. I think there are couple of examples about this
in some demos with say "voxel landscape" or "doom" effects.

Considering ADoom there's the -mmu option which changes the cachemodel
for the chunky buffer as write through so no cache lines are allocated
at writes. The effect of this is about 10 percent speedup on M68060 and
a little less on M68040. This can be explained by M68060 having the four
entry store buffer where the writes can be buffered until bus is free.
Currently also to minimize the counter effect of not having copyback the
floor and ceiling is drawn with long word writes to long word aligned
addresses. I plan to improve the "trick" so that floor and ceiling can
be drawn with copyback on but sprites and walls aren't.

-- 
D.
