Jump to content
IGNORED

set optimization (Only one or more than one?)


Random Terrain

Recommended Posts

The bB page doesn't seem to be clear on this. Can you only use one of the four options, or can you use more than one?

 

www.randomterrain.com/atari-2600-memories-batari-basic-commands.html#optimization

 

If you can use more than one, is it similar to kernel options where only certain options can be used together?

 

 

Thanks.

Link to comment
Share on other sites

I confirmed by looking at the source code for the bB compiler... the optimizations can be mixed and matched.

 

Can you tell if any of them are incompatible with each other? And can you tell if they can be on the same line like this:

 

set optimization speed size noinlinedata inlinerand

 

or if they need to be on separate lines like this:

 

set optimization speed

set optimization size

set optimization noinlinedata

set optimization inlinerand

 

 

Thanks.

Link to comment
Share on other sites

None of the settings are incompatible with each other, with the exception of "set optimization none". If you use that it will disable previous optimization lines.

 

You can't put optimizations all on the same line, they need to be separate lines.

 

Thanks. I'll update the bB page later today.

Link to comment
Share on other sites

I took a look at the optimization description today, and what you have written for "size" isn't accurate. Based on what I see in the bB source code, this is how it works...

 

size

May decrease the size of generated code when using the multisprite kernel. bB will attempt to reuse bytes that may otherwise go wasted when it tries to align sprite data.

Link to comment
Share on other sites

I took a look at the optimization description today, and what you have written for "size" isn't accurate. Based on what I see in the bB source code, this is how it works...

 

size

May decrease the size of generated code when using the multisprite kernel. bB will attempt to reuse bytes that may otherwise go wasted when it tries to align sprite data.

 

Weird. That was written by batari. I guess he forgot how it worked when wrote up the description.

 

 

Thanks.

Link to comment
Share on other sites

Maybe his intent was to increase the scope for "size" beyond the multisprite kernel, but that's all it's affecting right now, and it doesn't have anything to with multiplication or division. (unlike "speed")

 

I'm not trying to claim I'm more authoritative on bB than batari, but the source code is pretty clear. Anyone with a rudimentary understanding of C can search statements.c for "optimization" and confirm what I'm saying.

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...