| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | speed... |
JB> Hi Hans. JB> 25-Mar-04 19:17:40, Hans Andersson wrote to Jasen Betts HA> I am playing with an old BBS program written i QBasic - reads HA> first in - start files - such as, config.dat, lang.dat, lang.ndx, HA> runtime.dat, opens a logfile and a members database, reads in HA> commands and area menus. Lots of string handling - for writing HA> messages and searching for files etc. Have a version written i C, HA> it is much slower reading/storing files and handling strings. It HA> feels quite slow and the code size is bigger also - about 220k. HA> Qbasic is only 150k and much faster JB> Yeah I see how that could be slow in C. strings are JB> one of the weak points JB> of C. But C also have an extra "API" standard buffer interface layer over the DOS disk services, but not basic BLOAD, BSAVE. Output to screen also uses this "interface" - with stdout, stdin etc... getch(), but _bios_getch... feels much faster. But basic should have pointers as C - or C strings like Basic. In C one must use lots of code to check buffer over/under run (memory errors) to be on the safe side.... Bye H.A. --- Maximus/2 3.01* Origin: Databasen TankBaren, +46-920-257910 (2:201/209) SEEN-BY: 633/267 270 @PATH: 201/505 106/2000 633/267 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.