About C / Z80 optimizations (SDCC)

Page 15/17
8 | 9 | 10 | 11 | 12 | 13 | 14 | | 16 | 17

By hit9918

Prophet (2866)

hit9918's picture

15-09-2019, 18:45

I am surprised that the pile of SDCC code is only 2 times slower than asm.
then one can make a game in C.

By PingPong

Prophet (3435)

PingPong's picture

15-09-2019, 19:03

hit9918 wrote:

I am surprised that the pile of SDCC code is only 2 times slower than asm.
then one can make a game in C.

sdcc is the anti optimizing compiler, both in size and speed it is unmatchable ;-)

By PingPong

Prophet (3435)

PingPong's picture

15-09-2019, 19:04

Using only 256k of ram and r800 to code a text adventure

By zPasi

Champion (441)

zPasi's picture

15-09-2019, 23:43

PingPong wrote:

Using only 256k of ram and r800 to code a text adventure

Stop the bullshit and prepare the benchmarks you promised earlier.

By akumajo

Rookie (24)

akumajo's picture

17-09-2019, 21:21

zPasi wrote:

Stop the bullshit

I can't believe it! It was enough to ask! Maybe could we talk about the topic now?

By Thom

Hero (576)

Thom's picture

22-09-2019, 20:13

Sorry for going slightly off topic, but I just saw this: https://github.com/mattgodbolt/compiler-explorer (or direct link: https://godbolt.org/ ). It’s a website that lets you type in C, C++, D, Rust, Haskell and other compiled programming languages and then shows you the assembly output. Unfortunately no Z80 assembly, there is a x86 to 6502 tool available though.

By geijoenr

Expert (93)

geijoenr's picture

22-09-2019, 22:54

the whole point of using C is that it reduces the "cognitive load" required to do something,
so you can come up with stuff that is a couple of orders of magnitude more complicated than what you would do in assembler, in the same amount of time.
Speed is not everything, even in an MSX. Sometimes game logic is more important.

By ARTRAG

Enlighted (6236)

ARTRAG's picture

22-09-2019, 23:15

Thom wrote:

Sorry for going slightly off topic, but I just saw this: https://github.com/mattgodbolt/compiler-explorer (or direct link: https://godbolt.org/ ). It’s a website that lets you type in C, C++, D, Rust, Haskell and other compiled programming languages and then shows you the assembly output. Unfortunately no Z80 assembly, there is a x86 to 6502 tool available though.

nice site, but no z80 compilers...

By ToriHino

Champion (360)

ToriHino's picture

23-09-2019, 00:43

Also a bit off topic, is there a more easy way to debug the generated C code other than stepping through it in assembler while keeping the .map and generated .asm files next to it?
Especially since the generated code is not always that easy (or short) this might make things more complex to follow.

By ducasp

Master (147)

ducasp's picture

23-09-2019, 01:07

ToriHino wrote:

Also a bit off topic, is there a more easy way to debug the generated C code other than stepping through it in assembler while keeping the .map and generated .asm files next to it?
Especially since the generated code is not always that easy (or short) this might make things more complex to follow.

I don't think an in-MSX debugger is feasible, but perhaps someone could work on the Open MSX Debugger to support debugging c code, the files generated by sdcc contains all the info needed for a debugger, but, you know, someone has to do it... That's the beauty of Open-source, you can always take charge and built a feature yourself. Smile

Page 15/17
8 | 9 | 10 | 11 | 12 | 13 | 14 | | 16 | 17