Klaus2m5 wrote:
jsii wrote:
I still say there must be better ways to do this yet both in terms of byte count and speed. 21 bytes? Cheers.
You may not have noticed, but shorter code contradicts faster code because of the overhead the additional loops have over linear code.
Not necessarily.
Quote:
Of course this is not true for unnecassary overhead like saving carry, rotating the multiplier independant of the result or rotating the multiplicand and having to add with the width of the result. But we have taken care of that, haven't we?
I'm not sure who "we" is, but as far as I'm concerned you took care of all that yourself. It was you who let the cat out of the bag, after all, not I. All I did was write a bit of my own (inefficient) code here and there (without copy-pasting anything, mind you), while at the same time trying to enjoy the ride all along the way. I think I've done it too, also by seeing better derivations and improvements over the process from sharp posters like yourself.
Quote:
And yes, changing the rules (even if they are your own) is cheating.
'cheating' according to whom, and which rules are those exactly and where can I find them? I'd like to read them, thank you.
On a side note, if what I've just perceived here is correct, you guys should lighten up around here, it's healthier that way.
Dogs bite less, and it all kind of brings back to me why I tend to avoid forum posting altogether; kind of like avoiding (most-if-not-all) 00p cultists wherever I spot them. If I'd ever want this kind of response to the posting of a simple routine, I could always go to a c++ or java board, to gamedev boards or to (gasp) Usenet itself, where arrogance looms aplenty. That sort of thing is "the last" thing I'd expect from '6502 people' (or so I've always liked to think). Yeah well, maybe I've been wrong all along, no sweat. So if this is the way you guys have fun around here, I dread to see what it is like when you're all bored. But don't fret it. I don't take any of it personally, why would I anyway?
And speaking of solutions, I'd particularly like to see your 21 byte solution. I'm always interested to learn more how to count cycles, to add, to avoid saving carry and all that. And once again, "let's" 'all of you' keep it well in mind I'm just a beginner here, doing little more than hopefully trying to learn something good and new from all-you-the-best. I'm not a cool expert like yourselves, so don't take any of it personally against me. So I say point your guns elsewhere, why don't ya? Like in the 'right' direction, know what I mean? I think we're all facing the same kind of foe here, and this is just a bit of programming for me as far as I'm concerned, not some kind of weird wit or drama contest. So yeah, Cheers.
(And I do have a 21 byte solution already, by the way, but this being the mood around here, I'd like to wait until you or someone else takes the lead this time around and posts his solution first instead. Once you do it, though, be sure that, rules or no rules, I'll be pushing for a 19 byte solution next (of course)).