Mail Archives: djgpp/1997/04/14/19:55:29
From: | snarfy AT goodnet DOT com
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Re: what is __djgpp_exception_processor??
|
Date: | 14 Apr 1997 20:58:45 GMT
|
Organization: | GoodNet
|
Lines: | 45
|
Message-ID: | <5iu5q5$64g$1@news.goodnet.com>
|
NNTP-Posting-Host: | goodnet.com
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
>Hi all!
>
>I just ported my little vectorcube program from Turbo c
>to djgpp2. It took me about 2 hours for a 400 lines sourcecode
>(speaks for the quality of djgpp) without asm-optimizing.
>The result was a bit disappointing: it ran 4 times slower than with
>Turbo c which is surely my fault and not the of djgpp.
>gprof reported me that 72% (22% self) of the runtime were wasted by
>the function (or macro or whatever) "__djgpp_exception_processor"
>without giving me the number of calls to it.
__djgpp_exception_processor is called everytime an exception happens
under djgpp. Without a real 387, an exception happens everytime a
floating point operation happens. So if you use a lot of FPU code,
that's a lot of overhead. Turbo C most likely uses a different method
than DJGPP, which is why you see such a dramatic difference. Look
in $DJGPP_DIR/src/libc/go32/exceptn.S for your answers :). You may
want to invest the $10 for a 387 chip, or you may find a better/faster
emulator than the 387.dxe thing that comes with DJGPP. I believe
the FAQ points to other emulators besides the free one that comes with
DJGPP.
>To my program is to say that FP- operations are heavyly used and I
>have to use an FP- emulator because I dont't own an 387 FPU.
>2 times I call an interrupt (set vga/text) , use
>1* __djgpp_nearptr_enable() + disable, clear the virtual screen with
>memset (400 times), copy it to vga - memory mith memcpy (400 times) and draw
>hlines with memset (44606 times).
>My question is now, which function may use "__djgpp_exception_processor"
>and how can I do the things without or with less use of it,
>and btw what is it ?
>
>I would be very happy, if someone could give me an answer to my
>question but please don't personally email me (we have problems with our
>mail_server).
>
>
> Thank you all
No problem.
Josh
snarfy AT goodnet DOT com
- Raw text -