Re: Fast Image Routine & Saving a sequence
- Posted by Ralf Nieuwenhuijsen <nieuwen at POP.XS4ALL.NL> May 28, 1997
- 665 views
>[ I'm not gonna put your long message in here ...] (I'm gonna try to write a longer one.. ..let's see who wins!) First, thanx for the simple and easy to use code. I can now use it in my code without any function or proceure. Using less of those is the best optimization you can have. Just plotting a pixel goes faster if you do it directly with a machine_proc() call. My only real point was that sometimes it isn't nessesary to poke each line seperately. If you made a sequence of 6400 length if stead of a 2d sequence of 320 * 200 you have the possibility to poke the total screen in once!! And i thought that in some way XOR was used to make an sprite-mask, guess not! If someones says their is a technique using XOR, tell me. I am not on this list-serv to talk about moral values and stuff, but read my other mail, where i make my point clear and closed. However know that i have never knew that this discussion had already happened. Still, each time i use pokes & peekes i feel a bit bad, cause i am just trowing away all the portability that Euphoria has to offer. And i insult Euphoria by not using their normal pixel & display_image routine, by not using them i admit that there are weak and i think next releases of Euphoria should fix this. Also i wonder how quick a program runs when you write a pre-compiler that changes all the calls to constant variables to their value, it might be a lot and i think that in a next Euphoria release the ex.exe program should be made to handle ENUMS and NAMES. Names are then used for a specified sequence entry and enums for values of a specified sequence entry or atom. Cause now you have to write a zillion lines of code just containing constants. And a look-up table in Euphoria is slow, not as slow as multiplying, but slow cause it has flexibilities it doesn't need, a look-up table doesn't need the ability to be changed in any way. (Size, Values..) Maybe Euphoria needs a new data type called tables, a fixed size, fixed dimensioned sequence optimized for speed , but with two big advantage, they should handle slicing like this: my_table[2..3][3..8][0..10] = {4,5,6,{5,6}} And they should allow uninitialized entries. When a routine is called given a uninitialized value, it should be ignored. Tables containing those values offcourse not! For extra speed it would be nice if you could specify the number of bits it is using or just say sequence, which means that it is a sequence table. Offcourse a sequence can also contain tables. Oops, i'm keep on loosing my subject and move over to another. ~~~~~~~~~~~~~~~~~~~ Ralf Nieuwenhuijsen nieuwen at xs4all.nl