Jump to content

Recommended Posts

I'm checking out BoostC. Trying to optimize a double for-loop that uses array indices, I used a pointer instead. The resulting code was much larger, in large part because the compiler's apparently using 16-bit values for pointers.

 

This is on a 16F648A, which only has 256 bytes of RAM. So an 8-bit value should be sufficient for any pointer type, and would be more directly supported by the hardware. (E.g., "p++" would be one instruction, not three.)

 

Any thoughts? Any way I can force this? It makes pointer use extremely inefficient.

Link to post
Share on other sites
I'm checking out BoostC. Trying to optimize a double for-loop that uses array indices, I used a pointer instead.  The resulting code was much larger, in large part because the compiler's apparently using 16-bit values for pointers.

 

This is on a 16F648A, which only has 256 bytes of RAM.  So an 8-bit value should be sufficient for any pointer type, and would be more directly supported by the hardware.  (E.g., "p++" would be one instruction, not three.)

 

Any thoughts? Any way I can force this?  It makes pointer use extremely inefficient.

 

Try using a character array instead.

Link to post
Share on other sites

Join the conversation

You are posting as a guest. 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...
×
×
  • Create New...