Re: [M100] Notoriously S.L.O.W BASIC posted - help speeding it up appreciated

2022-10-29 Thread Mike Stein
My head hurts ;-) Oddly enough, explicitly typing variables (e.g. A%) actually slows things down a bit. And yes, the intermediate values can be >32767 as long as the result is a legal integer. m On Sat, Oct 29, 2022 at 10:20 PM Eric LK wrote: > I wrote: > >FWIW, I also tried "caching" the

Re: [M100] Notoriously S.L.O.W BASIC posted - help speeding it up appreciated

2022-10-29 Thread Eric LK
I wrote: >FWIW, I also tried "caching" the result of "PEEK(P+1)" but again, >it didn't change the result (in all 3 implementations, 1000 >iterations took 14 seconds, so those modifications aren't really >interesting, except for the brain picking exercise ;o)). Well, I managed to (almost) half

Re: [M100] Notoriously S.L.O.W BASIC posted - help speeding it up appreciated

2022-10-29 Thread MikeS
Hi Will, Too many times I've made some changes and either accidentally deleted the file or messed it up so badly that I want to revert to the previous version, so I've learned the hard way that it's a good idea to save the work before making major changes. One way is to SAVE it locally on the

Re: [M100] Notoriously S.L.O.W BASIC posted - help speeding it up appreciated

2022-10-29 Thread Will Senn
Hi Mike, I'm curious about the COM stuff. In a later note you said: It's actually sorta been fun programming on the 'real' M100; I left a download running on the PC and every time I wanted to backup an interim version just in case, I just pressed F3 and F7 (which I'd programmed with the COM

Re: [M100] Notoriously S.L.O.W BASIC posted - help speeding it up appreciated

2022-10-29 Thread Will Senn
Wow. Crazy fast. I've been schooled for sure. For a program with no whitespace to speak of, it's pretty straightforward (not that I would have come up with it anytime soon, but it reads well). Thanks for taking the time and providing it... along with the comments!Lots of things to think about

Re: [M100] Notoriously S.L.O.W BASIC posted - help speeding it up appreciated

2022-10-29 Thread John R. Hogerhuis
As to type sigils on variables... Don't know how much it changes ram use or execution time. Some! Maybe look at the tokenized output difference for the space difference. As to the multiplication versus the AND... you'd have to test. Interesting. I will try it. Speaking of testing, I'm wondering

Re: [M100] Notoriously S.L.O.W BASIC posted - help speeding it up appreciated

2022-10-29 Thread Eric LK
"John R. Hogerhuis" wrote: > 10 DEFINTP:DEFSTRH > 20 H=CHR$(201) > 30 P=VARPTR(H)+1 > 1000 P=PEEK(P)+256%*(PEEK(P+1)+256%*(PEEK(P+1)>127)) > 1010 PRINTP Very nice. That seems a little more optimized than the solution I used for my "direct file access from RAM" implementation :o) You could skip

Re: [M100] Notoriously S.L.O.W BASIC posted - help speeding it up appreciated

2022-10-29 Thread MikeS
Verbose ruminations? We doan need no steenkin' documentation! Here's my latest (final?) version incorporating some of the ideas and hopefully a little less esoteric. Time to print 50 lines from 61 seconds down to 34, size from 635 bytes down to 406. Funny to watch it dump itself ;-) BTW, just