Re: "pointer stack instead of object stack"

Jump to navigation Jump to search

Re: "pointer stack instead of object stack"

You do not have permission to edit this page, for the following reasons:

  • The action you have requested is limited to users in the group: Users.
  • You must confirm your email address before editing pages. Please set and validate your email address through your user preferences.

You can view and copy the source of this page.

 

Return to Thread:User talk:Skilgannon/KDTree/Re: "pointer stack instead of object stack".

Calls to private methods are inlined. Calls to public methods aren't. Object references and polymorphism are a lot harder for compilers to optimize.

Polymorphism overhead can usually be detected with profiling.

MN (talk)04:00, 21 July 2013
 

Yeah, that's exactly where I was trying to speed things up. The way it is now, any path that I don't descend never has its Node contents examined, because I don't have to open up the Node to get the index when checking the bounds anymore. This means the Node contents (and the pointer to it) is never loaded unless it is determined that the Node needs to be searched.

Benchmarking says it's just a *tiny* bit quicker, and I like it so it stays =)

Skilgannon (talk)09:23, 21 July 2013