Skip to content

Conversation

@poke1024
Copy link
Contributor

@poke1024 poke1024 commented Oct 18, 2016

This actually has no effect in its current form (i.e. in master).

When applied to the qtime branch (#619) though, it speeds up things quite considerably and effectively gives Mathics a whole new, snappy feeling when working with large lists.

Before (i.e. untampered #619):

In[1]:= x = Range[100000]; Timing[Combinatorica`BinarySearch[x, 100]]
Out[1]= {0.142646, 100}

After:

In[1]:= x = Range[100000]; Timing[Combinatorica`BinarySearch[x, 100]]
Out[1]= {0.000985, 100}

In the non-ordered case, leaf_candidates is actually only used in the call to subranges, only that it's currently not used there; a future implementation should be fine with a list as well.

@sn6uv sn6uv merged commit 9181f6f into mathics:master Jan 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants