Jump to content
IGNORED

cc65 performance


Pengwin

Recommended Posts

As some of you know here, I have been working on a couple of projects. Unfortunately, they have been put on hold for an extended period (oh for the day when I could just get on with things like this). However, I have been wondering if I have been going about these in the right way.

 

Could anybody let me know their opinions as to performance of compiled programs when comparing cc65 to Kyan Pascal or Quick?

The benefits of being able to code in a modern text editor is very attractive, but I don't want to do this if I lose out on performance.

Link to comment
Share on other sites

I can't really answer your question exactly, since I've never used Pascal or Quick, but you could write a short piece of code in all languages and compare the assembler code created by each compiler.

 

With cc65, don't forget to compile with -Osir and also, take a look at the documentation pages on ways to optimize your C code for cc65. I've always found it fast enough for most tasks. Of course, you can't write a VBI or DLI using C... you should use assembly for that. Also, if you stay away from file i/o you will save a lot of space in your programs, since you won't have to link in those library functions... but conio is pretty useful for utilites and such.

 

I'm assuming a game is what you are writing... IMO, cc65 can be used to write a game (Cybernoid did it... check out JellyBeans). You could quickly turn out C code, hand-optimize where necessary and of course, VBI/DLIs in hand-assembly.

 

Only my opinion as a fairly long-time cc65 user on the Atari.

Link to comment
Share on other sites

I can't really answer your question exactly, since I've never used Pascal or Quick, but you could write a short piece of code in all languages and compare the assembler code created by each compiler.

 

With cc65, don't forget to compile with -Osir and also, take a look at the documentation pages on ways to optimize your C code for cc65. I've always found it fast enough for most tasks. Of course, you can't write a VBI or DLI using C... you should use assembly for that. Also, if you stay away from file i/o you will save a lot of space in your programs, since you won't have to link in those library functions... but conio is pretty useful for utilites and such.

 

I'm assuming a game is what you are writing... IMO, cc65 can be used to write a game (Cybernoid did it... check out JellyBeans). You could quickly turn out C code, hand-optimize where necessary and of course, VBI/DLIs in hand-assembly.

 

Only my opinion as a fairly long-time cc65 user on the Atari.

 

I have used all these languages in the past.

 

More important then the compiler quality is always the quality of the Algorithms used, slow code can be written in all of this languages.

 

For the "speed" of the compiled code, my ranking would be (just out of experience, I have no 'benchmark' to back this)

 

1) ACTION!

2) Quick

3) cc65

4) Kyan Pascal

 

with 3+4 being very near in most cases, of course development is much fast with cc65, as the compile cycles are more than 1000% faster. Quick is very limited in respect of the language, it is more a Assembler with Library and different Syntax.

 

The ranking in terms of quality of compiled code would be

 

1) ACTION!

2) cc65

3) Kyan Pascal

4) Quick

 

When I start a new project, I would consider ACTION! and cc65 (besides volksForth).

 

Carsten

Edited by cas
Link to comment
Share on other sites

...

I'm assuming a game is what you are writing... IMO, cc65 can be used to write a game (Cybernoid did it... check out JellyBeans). You could quickly turn out C code, hand-optimize where necessary and of course, VBI/DLIs in hand-assembly.

...

 

ECKN was written with the cc65 package.

About 1/3 of the code is C (board setup, game rules, scoring & highscore management (I/O), input dispatching (keyboard/joystick/consol)) and the rest is 6502 assembler (VBI/DLI, animations, RMT ported to CA65).

 

I like the package very much and linkage of assembler files with C parts couldn't be easier.

(even if you don't use the inline assembler feature.)

Beside this, CA65 is an outstanding assember with unique features.

 

I was very happy with Quick when developing on the XL, but a development environment on the PC with big screen

resolutions, syntax highlighting (I use Code Genie for writing the source code), nearly no compilation time and rapid

testing in the emulator is incomparable.

 

CU

Irgendwer

Link to comment
Share on other sites

Yeah, CC65 is my perferred choice. I write most of the code in C, then do my VBI and DLI routines with a mixture of C and assembly. This works great. I also created an XIO library for C so that you can use the XIO calls like in BASIC.

 

Also, I find that since I can easily embed assembly, I tend to write code first in C and if it is not fast enough, then replace it with assembly where needed.

 

 

Worked for Jellybeans and my other projects...

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...