??? 05/05/06 17:28 Read: times |
#115706 - It's a thorny issue Responding to: ???'s previous message |
Erik,
Everyone has his own domain in which what's been the crux for him resides. I think it's possible to devise a set of test routines that would, thoroughly enough, test the compiler output to allow for a reasonable comparison. Your comment, "It is truly amazing how little memory well crafted apps require." is quite correct, but it's not typical that compilers produce such code, code that's both small and fast. That's generally done using the assembler. If one compiler did it and the other didn't, I'd certainly want to be aware of it, though. IMHO, paging is easy enough to handle, but the overhead is costly. If you want to use relocatable code, it's not memory efficient, since you have to carry along a bit table indicating which bytes have to be modified, and then you have to modify them when you're loading 'em. If you want to manage the paged code as overlays, you certainly can't expect the compiler to do that for you efficiently for all cases. If you really want to test paging, e.g. in cases where there are colocateable tables to be overlayed by different routines, I think it's still too much to expect of a compiler. The compilers are designed for the "standard" memory model, up to and including the maximum for which the MCU was designed. Extending beyond that is probably an indication that the choice of MCU's was wrong. Yes, a valid test would include the points you've made. How well it does integer operations, how well it does floating point, well, those comparisons are optional, particularly since a floating point package isn't a language-specific option. It could be included, I suppose, but then, how often does it come up in the "real" world? I mentioned the NMIY SmallC source-code example because it scans a keypad and it talks to the LCD, which involves timing and could involve table lookups if combined with an appropriate serial input to LCD output task. What's more it provides a model that can be followed pretty closely so the it doesn't become a contest between the cleverness of one coder versus another. After all, someone wanted to compare the free Pascal compiler with the equally free SDCC, right? RE |