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

Measure ScopeLink, GetLink, BindLink, DualLink performance #8

Open
ngeiswei opened this issue Apr 27, 2018 · 2 comments
Open

Measure ScopeLink, GetLink, BindLink, DualLink performance #8

ngeiswei opened this issue Apr 27, 2018 · 2 comments

Comments

@ngeiswei
Copy link
Member

ngeiswei commented Apr 27, 2018

Scope links are probably the most expensive link types to construct and insert in the AtomSpace. First calculating the hash value during construction is more expensive than for non scope links. Scope links like PatternLink, BindLink, etc, are even more expensive to construct so. Then inserting them to the AtomSpace also requires more computation like testing for alpha-equivalence.

query_benchmark does support scope links but mostly for querying, not construction and insertion...

All that to say that scope links really should be supported by atomspace_bm (if that doesn't get replaced by something else soon).

@linas
Copy link
Member

linas commented Apr 27, 2018

Three or more distinct measurements are needed:

  1. Measure performance of insertion into atomspace for just plain, bare-bones ScopeLinks. This would measure the elapsed time for the alpha-conversion. (this essentially measures the constructor for ScopeLinks, plus the assorted baggage in the atomspace that triggers alpha conversion, including hash computation and hash comparison)

  2. Performance of insertion into atomspace for GetLink. This would measure the elapsed time to "compile" the search pattern. (most (almost all?) of the "compilation" happens in the constructor for the GetLink.)

  3. Execute performance for GetLink. This would measure the time to actually run a query. (GetLink::execute() more or less, plus the rest of the execute subsystem, needed to get to here.)

  4. Maybe do 2&3 for DualLink, BindLink. I expect that these will be similar to GetLink, but hey...

@linas linas changed the title atomspace_bm does not support scope links Measure ScopeLink, GetLink, BindLink, DualLink performance Apr 27, 2018
@vsbogd
Copy link
Contributor

vsbogd commented May 3, 2018

Ensure that relevant benchmarks are added to cover:
atomspace/scripts/query/benchmark_query.sh
atomspace/scripts/benchmark_utests.sh
and remove these scripts.

linas added a commit that referenced this issue Jun 1, 2018
ngeiswei added a commit to ngeiswei/benchmark that referenced this issue Sep 10, 2020
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

No branches or pull requests

3 participants