Jump to content
IGNORED

Advanced optimizations in CC65


Recommended Posts

@vbc thank you for your comment to the blog post! Also for me it was quite strange how the benchmark was done, but I do not think vbcc was sabotaged there, more the author didn't know how to handle this compiler properly.

12 hours ago, vbc said:

When I tried to add a timer variable to measure run-time on the C64, the code did not compile anymore on cc65, because it exceeded the 256 byte limitation of cc65. 

what 256 limit do you mean here?

Link to comment
Share on other sites

2 hours ago, ilmenit said:

@vbc thank you for your comment to the blog post! Also for me it was quite strange how the benchmark was done, but I do not think vbcc was sabotaged there, more the author didn't know how to handle this compiler properly.

I agree that he probably did not introduce these bugs intentionally. If such intention is implied by "sabotaged" then my wording was probably wrong (I am not a native English speaker). Also, I appreciate that the author published all his test-code and did openly communicate that he would not recommend vbcc due to his dislike of the license anyway (although this seems a strange reservation for a comparison that is supposed to help a greater audience in choosing a compiler - I know that very few people share this reservation).

 

What I do not appreciate is that when he got a different result with vbcc, he apparently did not really investigate what the problem was. He just claimed that vbcc was buggy, while, in fact, his configuration and his test case was. I would expect more diligence here.

Quote

what 256 limit do you mean here?

Maximum size of stack frame in a function.

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...
  • 1 year later...

I just noticed that somebody here asked about random numbers.  I have my own rand() function at c65 additions - Manage /util at SourceForge.net.  The file is at the bottom of the page.  It was written for CBM targets, and the _randomize() function reads the CBM clock in ZP, but cc65's _randomize() function should work.  One good thing about it is its speed and size, as it doesn't include any multiplying or other involved computation.  Another thing: you can supply an extra argument to increase randomness.  A bad thing: somebody commented that it didn't produce random enough numbers.  I ask you to try it out and tell me how it works.  If it doesn't produce good results, try tweaking the constants used in the rand() function.

 

BTW, can the OP link to my optimizations online, please?

Link to comment
Share on other sites

9 hours ago, Harry Potter said:

I ask you to try it out and tell me how it works.

Shouldn't you be able to find a random-number-generator test suite online somewhere?

At least try yourself running a chi-squared test, e.g. here:
https://stackoverflow.com/questions/12190091/random-number-generator-test

 

[Edit] Then run yours against the existing CC65 implementations for comparison.

When we did the Atari back-port to CC65, Sidney Cadot was on top of ensuring a good implementation went in.

e.g. https://cc65.github.io/mailarchive/2000-03/0072.html

Edited by Wrathchild
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...