Re: XML was RE: RE: A portable preferences library
J C Lawrence <[email protected]>
| Newsgroups | gmane.games.devel.general |
|---|---|
| Message-ID | <[email protected]> |
On Tue, 16 Dec 2003 21:53:36 +0100 Alen Ladavac <[email protected]> wrote: > Nope, you missed the boat. :) Damn, I'm gonna fire that ranging scout! > The idea is that XML is a generic format, freeing you from writing > your parser. Precisely. > There is no much point storing plain blobs inside XML. Then, you can > just dump it with fwrite() as well. Dumping a blob in XML really isn't that much more difficult. You either drop it inline as a base64 or as a MIME attachment in base64. The data size grows by 30% of course, but that's expected as a text representation. > But the question is: If you save your vertices in x="1" y="0"...etc > format, can that still load as fast as if you just dump > 3f8000000000000...etc? Of course not. double foo[large_number]; ... read (h, foo, sizeof (foo[0]) * large_number) Is necessarily going to be cheaper than parsing an XML structure of large_number doubles. The only question is whether the added expense is worth it on some level. If you're shaving instructions... > People started to argue that the verboseness of the format doesn't > hinder its performance. I say, ok, it might be possible, but show me > the numbers. Didn't see any yet. :/ Frankly and numbers you see need to be treated with a lot of salt, even the ones I post. It is a simple enough thing to test with whatever parser you pick. -- J C Lawrence ---------(*) Satan, oscillate my metallic sonatas. [email protected] He lived as a devil, eh? http://www.kanga.nu/~claw/ Evil is a name of a foeman, as I live. ------------------------------------------------------- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click _______________________________________________ Gamedevlists-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/gamedevlists-general Archives: http://sourceforge.net/mailarchive/forum.php?forum_id=557