Which is faster?

If you have questions about any aspect of QBasic programming, or would like to help fellow programmers solve their problems, check out this board!

Moderators: Pete, Mods

Post Reply
User avatar
Zamaster
Veteran
Posts: 174
Joined: Wed Jun 15, 2005 1:51 pm

Which is faster?

Post by Zamaster »

Which type of memory is faster: XMS or EMS?
C:\DOS
C:\DOS\RUN
RUN\DOS\RUN
Nodtveidt
Veteran
Posts: 826
Joined: Sun Jul 25, 2004 4:24 am
Location: Quebradillas, PR
Contact:

Post by Nodtveidt »

I think you're gonna have to have someone like Plasma verify this, but to my knoweldge, EMS is typically faster because it stays in v86 mode whereas XMS has to switch to protected mode to be used. But since EMS on modern computers is emulated through XMS...I'm not sure if it's really faster or not. In any event, XMS is more widely supported than EMS nowadays, so XMS is generally better to use even if it may be slightly slower.
Antoni
Veteran
Posts: 132
Joined: Wed Jun 15, 2005 3:01 pm
Contact:

Post by Antoni »

If you are in QB, add to what Nek said:
In EMS you can peek/poke/put/get directly the EMS window.
XMS is unreachable from QB, you must copy the data to normal memory with the XMS functions before accessing it.
Z!re
Veteran
Posts: 887
Joined: Wed Aug 04, 2004 11:15 am

Post by Z!re »

Actually, using XMS isnt that slow..

I used it wthout problem for the QB version of FieldView (MOoRPG)

Loaded large parts of the world (which was 64mb total) until the mem was filled, keep the parts closest to the player.

Dump parts from XMS to conventional when they're in use..

A part was 320x200x2 bytes, where each 2byte block represented a tile
Each part was additionally divided up into two parts, to fit in a 64kb segment


MOoRPG ran at 60FPS (Which is what I locked it at) without problems, without the block people reported as high as 500'000FPS



I used RelLIB's XMS routines for copying conventional mem to XMS, and retreive from XMS back to conventional



But generally, EMS is faster, but the speed difference is neglectable with some creative coding..
The benefits of being able to run on 30% of the worlds computers, as opposed to 10% weights up any dissadvantage, if any, XMS would have compared to EMS
I have left this dump.
Post Reply