Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@johnmyleswhite
Copy link
Contributor

This PR makes the code a bit faster, although it also makes the code a bit uglier.

Basically, there are two types of changes:

  • Disable some bounds-checking using the @inbounds macro
  • Pull indexing operations out of loops when possible

Assert indexing operations are in bounds
Pull indexing operations out of loops when possible
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these just stylistic or do they impact performance in some way?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question: they actually may not impact performance anymore. At one point in the past they could help the compiler from getting confused about the return type of for loops, but that doesn't seem to be true anymore.

slycoder pushed a commit that referenced this pull request Dec 8, 2013
@slycoder slycoder merged commit e1a242b into slycoder:master Dec 8, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants