Hacker News new | past | comments | ask | show | jobs | submit login
Speeding up a program for a 50 year old processor (mark.engineer)
116 points by asicsp on Nov 7, 2023 | hide | past | favorite | 15 comments



> Fabrice Bellard’s algorithm

There is it. Sure, why not. Is Bellard our Euler? Does he just sit around all day having peeled grapes fed to him while he writes amazing things?

Fabrice, when I’m appointed Lord Emperor, you’ll have a fully endowed role of working on whatever it is you want to work on that day.


> the clock signal, generated from stm32 timers is not 100% accurate, and the output frequency is about 740.1kHz, which is higher than the specified 740kHz. So I would say that the Intel 4040 even got overclocked.

Now I'm starting to wonder how far we can push a 4040... would be a nice challenge to see how fast the 4040 _could_ have been


Do you mean overclocking a 4040, building the best 4040 with techniques available at the time, or how fast modern production could make a 4040?


Sometimes, because I don't understand chip design, I wonder why we can't simply make 5nm MOS 6502 or similar chips. Technically I suppose we could design a modern CPU with the 6502 or Z80 instruction sets, but would they be of any use? They should be absolutely tiny and use virtually no power, but would they be compatible with anything?


68000 cores are still commonly used in modern chips. I don't know the process scale offhand, but they're used all the time in USB to serial chips and other interface type devices.

Another example, the Chinese counterfeit Saelea logic analyzers use a 68000 core with a USB phy tacked on


They exist (though today it's so cheap to make CPUs that you can find embedded tiny little CPUs used for one thing that are actually miniature versions of old CPUs).


I'd say overclocking a real/vintage 4040, and see how far we can push it while still able to finish the Pi calculation algorithm.


The 4040 has a very narrow range of permissible clock cycles in the datasheet (1.35-2 µs), which makes me think it uses dynamic logic, so the tolerance for higher/lower clocks is likely quite limited.


You can run 4004 by very low frequency (much lower than specified 500kHz) and it would work OK.

I also had an idea to overclock i4040 more, but even 740kHz was hard to work with, because I had just 200 stm32 ticks per i4040 sub-cycle to do all I/O logic (RAM/ROM interface for i4040).


I can't imagine that overclocking was already a thing back in the 70s. So just because Intel specified a narrow operating range doesn't mean that it is guaranteed not to work outside that envelope.

I can imagine Intel to just have specified a narrow operating range where the device is guaranteed to work reliably within the specified voltage/power envelope. We might be surprised to see higher clock speeds if we play with the supply voltage for example.


The content here seems great, but for some reason I find the prose difficult to follow. Maybe I'm just too tired? Some sentences are oddly phrased and I have to keep backing up to re-read them.


Yeah, sorry for that. I spent more time on technical side of article rather than polishing grammar and picking right words. As for non-native speaker it is hard for me to construct sentencies that match natural English speech.


Your grammar and style are great. This isn't a novel, it's highly technical material about concepts that are difficult, very detailed, and unfamiliar to most readers. It's okay if people have to re-read stuff.


nah, never worry about your english, mate. those anglos should be happy that you're accommodating them by using english.


The author does not appear to be a native speaker of English, that's all.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: