User Tools

Site Tools


assemblyscript_in_c

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
assemblyscript_in_c [2026/01/17 02:09] – created appledogassemblyscript_in_c [2026/01/21 01:59] (current) appledog
Line 5: Line 5:
  
 == The Best AssemblyScript can do == The Best AssemblyScript can do
-After several attempts at optimizing instructions I managed to get LDA to 95 MIPS, STA to 80 MIPS, DEC to 95 and NOP to 115. The NOP was easy as it's basically just a function call.+After several attempts at optimizing instructions I managed to get LDA to 95 MIPS, STA to 80 MIPS, DEC to 95 and NOP to 114. The NOP was easy as it's basically just a function call.
  
 Next I tried the typical 'leader function' approach: Next I tried the typical 'leader function' approach:
Line 30: Line 30:
 </codify> </codify>
  
 +The results? 
  
 +Pre-C NOP was 114 MIPS. Post-C... wait for it... 105 MIPS. Not bad! Then I looked at the leader function. Ther's an IF in the hot path now. It also damages every other instruction! So for example, if I look at LDA now it's no longer a 98 MIPS operation -- it's 85. This strongly implies that the IF is also damaging POST-C's operational speed by some number. Likely 10-15 just like in AssemblyScript. The question is then, can POST-C LDA or ADD or any other compete with it's Pre-C version? And, is it worth it to convert //everything// into C?
 +
 +First, the ISA has to be solid. Feature freeze. Then we move everything into C. The more we move, hopefully, the faster it gets. This is on the back burner for now, while we work on Pao Alto Tiny Basic (see INT 05h documentation).
 +
 +== Observations
 +Not done yet
 +
 +== Conclusions
 +Not done yet
assemblyscript_in_c.1768615761.txt.gz · Last modified: by appledog

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki