Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite the cpp example to do the same thing as the nim example #60

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

det
Copy link

@det det commented Jan 2, 2015

The current C++ example is unnecessarily complex and slower than a naive implementation. This patch makes the C++ example work the same way as the Nim example by using a vector with 1 byte per bool and using globals.

@lgeek
Copy link
Contributor

lgeek commented Jan 2, 2015

I'm not Jonathan so I can only provide a datapoint, but for me this is 15% slower than the current CPP implementation on ARM (Cortex-A15). Access to globals is slower and the template-based current implementation passes the visited bitset by value for small graphs (it's a single half-word), including the one used for benchmarking, which is faster than accessing as a global or passing by reference.

@logicchains
Copy link
Owner

I've found the same; on ARM it's around 3.5 seconds for this
implementation, compared to around 3.0 for the previous one.

On 3 January 2015 at 09:39, Cosmin Gorgovan notifications@github.com
wrote:

I'm not Jonathan so I can only provide a datapoint, but for me this is 15%
slower than the current CPP implementation on ARM (Cortex-A15).


Reply to this email directly or view it on GitHub
#60 (comment).

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.

3 participants