Robot Game: Comparing 6502 C, Assembly, and Forth
1–10 of 37 posts
Re: Robot Game: Comparing 6502 C, Assembly, and Forth
#2When I use Forth, it's often for high-level applications[0] with the performance critical words written in assembly. So this keeps the complexity relatively low as opposed to writing the whole thing in Forth.
[0] https://github.com/siraben/zkeme80/blob/master/src/bootstrap...
Re: Robot Game: Comparing 6502 C, Assembly, and Forth
#3This nicely provides empircal evidence on the slowdown of using Forth, which seems to be around 10 to 20 times slower than optimized assembly. I was initially surprised by how poorly Forth performed on all counts of speed, memory usage and development time. For something as complex as a game the lack of a type system and postfix nature make Forth quite unsuitable. When I use Forth, it's often for high-level applicati…
Re: Robot Game: Comparing 6502 C, Assembly, and Forth
#4Re: Robot Game: Comparing 6502 C, Assembly, and Forth
#5This nicely provides empircal evidence on the slowdown of using Forth, which seems to be around 10 to 20 times slower than optimized assembly. I was initially surprised by how poorly Forth performed on all counts of speed, memory usage and development time. For something as complex as a game the lack of a type system and postfix nature make Forth quite unsuitable. When I use Forth, it's often for high-level applicati…
Re: Robot Game: Comparing 6502 C, Assembly, and Forth
#6This nicely provides empircal evidence on the slowdown of using Forth, which seems to be around 10 to 20 times slower than optimized assembly. I was initially surprised by how poorly Forth performed on all counts of speed, memory usage and development time. For something as complex as a game the lack of a type system and postfix nature make Forth quite unsuitable. When I use Forth, it's often for high-level applicati…
I've written Forth compilers that generated output that was ~25% slower than optimized assembly, without putting that much work into it. There are companies that will sell you a much better compiler [0], at prices even approachable to hobbyists.
[0] - https://www.mpeforth.com/software/pc-systems/vfx-forth-for-l...
Re: Robot Game: Comparing 6502 C, Assembly, and Forth
#7This nicely provides empircal evidence on the slowdown of using Forth, which seems to be around 10 to 20 times slower than optimized assembly. I was initially surprised by how poorly Forth performed on all counts of speed, memory usage and development time. For something as complex as a game the lack of a type system and postfix nature make Forth quite unsuitable. When I use Forth, it's often for high-level applicati…
Yes, FORTH is an elegant alternative to BASIC on very small systems, not something you should expect high performance from.
Whether anyone has made a sophisticated optimising FORTH for 6502, I don't know.
Re: Robot Game: Comparing 6502 C, Assembly, and Forth
#8Nice use of High Level Assembly with the macros!
Re: Robot Game: Comparing 6502 C, Assembly, and Forth
#9This nicely provides empircal evidence on the slowdown of using Forth, which seems to be around 10 to 20 times slower than optimized assembly. I was initially surprised by how poorly Forth performed on all counts of speed, memory usage and development time. For something as complex as a game the lack of a type system and postfix nature make Forth quite unsuitable. When I use Forth, it's often for high-level applicati…
I think the writer use case takes no benefit from Forth. He already has some code and is trying to translate and optimize it. In this case, none of the advantages of Forth matter because he is not doing the development interactively. He was also tied to an existing code architecture that is alien to Forth. A Forth programmer starting from scratch would certainly design things in a way that makes more sense to Forth.…