X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: Rugxulo Newsgroups: comp.os.msdos.djgpp Subject: Re: gprof output Date: Mon, 4 Jun 2012 03:54:07 -0700 (PDT) Organization: http://groups.google.com Lines: 23 Message-ID: References: <7822bb4a-1059-491a-8489-e1d9f3dbc501 AT l17g2000vbj DOT googlegroups DOT com> <99bf0561-8756-4138-92aa-6b25499f1c57 AT h41g2000yqm DOT googlegroups DOT com> <598547d0-7ab7-4e79-8a0a-77935f3323b4 AT w24g2000vby DOT googlegroups DOT com> NNTP-Posting-Host: 65.13.115.246 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1338807247 16826 127.0.0.1 (4 Jun 2012 10:54:07 GMT) X-Complaints-To: groups-abuse AT google DOT com NNTP-Posting-Date: Mon, 4 Jun 2012 10:54:07 +0000 (UTC) Complaints-To: groups-abuse AT google DOT com Injection-Info: o17g2000yqb.googlegroups.com; posting-host=65.13.115.246; posting-account=p5rsXQoAAAB8KPnVlgg9E_vlm2dvVhfO User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.630.0 Safari/534.16,gzip(gfe) Bytes: 2313 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id q54BF2cf027103 Reply-To: djgpp AT delorie DOT com Hi, :-) Just some more quick thoughts, On May 26, 4:51 pm, Georg wrote: > > The program uses timeouts a lot and thus constantly queries the system > time. Maybe that is a reason for this. There's bound to be a faster way than calling DOS just to get the time. A naive guess would be some kind of farpeek to BIOS memory or whatever (probably mentioned in the FAQ). > It also uses VESA to write to the screen and there __dpmi_int is > called for bank switching. The writing to the screen is done with > dosmemput. I'm not experienced in gfx, but VESA is sometimes slow, esp. at higher resolutions. So either lower the resolution or try something else. Actually, why are you using bank switching, isn't that from old VESA 1.2? If you use the VESA 2.0 pmode stuff, it should be faster, and most video cards "should" support it these days (I'd blindly assume). See Allegro library (/v2tk/) for source code examples, it supports both (and then some).