Sorry for abusing this noble forum once again for a 35s question: Has this machine been benchmarked already in terms of speed?
Thank you :)
35s  how fast?


« Next Oldest  Next Newest »

▼
07142007, 05:00 AM
Sorry for abusing this noble forum once again for a 35s question: Has this machine been benchmarked already in terms of speed? Thank you :) ▼
07142007, 05:29 AM
Read through Gene's review, in the last pages you'll find the answer... ;)
Greetings, Edited: 14 July 2007, 5:30 a.m. ▼
07142007, 05:36 AM
Stupid me, thanks a lot, Massimo!
Edit: My 32SII does the looping test in 15 seconds. Twice as fast as the 35s? I must have overlooked something. Edited: 14 July 2007, 5:43 a.m. ▼
07142007, 02:25 PM
The 33s and 35s use a GeneralPlus (formerly SunPlus) microcontroller with a 6502 core, which can run at up to 4 MHz, but is probably running slower in th calculator. The 32SII used an HP Saturn core at about 650 KHz, if memory serves. The Saturn core was designed to do BCD arithmetic very efficiently; fixed point BCD addition or subtraction takes only a little more than one clock per digit, as does shifting. And of course floating point is performed in software by use of a lot of fixed point adds and shifts. The 6502 takes many more cycles to do the same thing. It takes at least 3 cycles to do a binary add of a byte in memory to the accumulator, so to add two 15digit floating point mantissas together (after they've been aligned) will require a code sequence something like the following (which is completely untested), assuming that the operands and result are stored in zero page in packed form:
ADDM: LDX #7 That takes about 139 cycles on the 6502, while on the Saturn the equivalent takes about 19 cycles (with operands in the 64bit processor registers). Also, the 33s and 35s firmware is written mostly (or perhaps entirely) in C. The 6502 isn't a very good target architecture for C, so that doesn't result in efficient code. If the arithmetic routines are written in C, they may be much worse than handcoded routines. In particular, the compiler is unlikely to infer the use of the 6502's decimal mode.
▼
07142007, 02:55 PM
Thanks for giving some insights! The museum benchmarks give more reasonable figures, so hopefully most meaningful applications won't run slower on the 35s than on the pioneer. BTW, I have in mind implementing the error function which I often use and already implemented on the TI59, PSION LZ and Sharp 1500 (the fastest!). At least, the 35s shouldn't evaluate it slower than the TI ;)
07152007, 02:50 PM
There was and old saying which was more or less... "Software becomes slower more rapidly than hardware becomes faster" In this case, it is not only software, but also architecture (specialized vs. general purpose). However, I like (mostly) the 35s, slow as it may be.
07172007, 06:44 PM
hi eric, the choice of the 6502 architecture i find perplexing. i understand that hp might not have had the luxuary to change from the 33s, but that doesn't explain the 33s. the compiler point is important and i think that there are better choices than the 6502. presumably there is not an ARM slow, cheap or low power enough to fit the bill. good compilers were built for the old 8086 architecture which might make an alternative. dust down your old copies of turbo C, and return (const char FAR*)FuManchu; well perhaps not. but seriously, unless they're doing something really funky, i would expect the biggest limitation is a 64k address space. with 32k RAM, then you've only got 32K rom. this rules out adding a lot of extra function. which is why stuff might be missing already. so better than segments might be our old friend the 68000, eg 16MHz dragonball like the palm had. flat architecture with mature compilers. one thought; is there an architure licensing cost. for example is the 6502 now effectively free? when all others would require, at least some, license. also, i had an idea about your ADD code. Gene's article mentiones 15 decimal internal precision and an 8 byte mantissa (without signs). if i had to write the code in C for the 6502 or someting like that, i'd implement a base 100 decimal system with 2 digits per byte stored in binary. since without leveraging the decimal instructions of the 6502, arithmetic will be a shift and mask extravaganza or else write the math code by hand. so with a base 100, you need a spare "padding" nybble that means 8 bytes gives you only 15 digits. which is what you've got, so maybe this is what they actually do. im using the same idea in hplua but with base 10,000 each "digit" of 0 to 9999 stored in 16 bits. the idea is that i get to use 16x16>32 multiply and replace divide constants with inverted mul constants BUT the hit is that i waste 3 nybbles in this base. this isn't so bad because my floats are 16 bytes (compared to 35s 12 bytes). i also take a hit converting each 16 bit binary to and from decimal for IO, but this is not signigicant overall.
▼
07172007, 07:07 PM
Quote: If I'm remembering correctly, the address space is way over 64k. There was quite a bit of mask rom in the CPU.
Quote: There are more space efficient packing mechanisms for decimals: http://www2.hursley.ibm.com/decimal/dbover.html. All part of the IEEE854 compliant decNumber library http://www2.hursley.ibm.com/decimal. The actual computations are carried out in base 10^n (n defaulting to 3, again from memory), so things are still relatively fast. Using 12 bytes for reals that would easily fit into 8 is bording on criminal. Using 37 bytes for each register is just wanton wastefulness :)
▼
07182007, 09:59 AM
the idea of using 10 bits for 3 digits is denser than Packed BCD, as you've pointed out. but i don't think things would still be relatively fast. i would expect this to be slower than a PBCD implementation because its more complicated. for example, one of the mantissa digits is stored in the exponent. nevertheless, it does get close to binary efficiency, ie 16 decimal digits for 8 bytes.
▼
07182007, 06:19 PM
Quote: Yes, of course, it must be slower than a pure PBCD implementation. In use, however, the performance loss doesn't seem to be such an issue. You unpack the numbers once, perform all your operations in what amounts to a PBCD format and repack at the end.
Quote: Yes, this was the bit that most surprised me. The packing is *very* efficient and not too far from a pure binary equivalent. Plus it includes all the IEEE nicities like denormalised, NaNs, infinities and proper rounding.
07172007, 01:53 PM
Allow me to further the abuse I see there is no expandable memory capability on the 35S. So, can it be assumed still, as was the case on the 33S, that if one has too many programs, they might not all fit? 