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

some work on deformed Burau matrix #38987

Merged
merged 3 commits into from
Dec 8, 2024
Merged

Conversation

fchapoton
Copy link
Contributor

@fchapoton fchapoton commented Nov 17, 2024

some refactoring work on deformed Burau matrix

to try to make it faster

(this is about investigating #38869)

📝 Checklist

  • The title is concise and informative.
  • The description explains in detail what this PR is about.
  • I have linked a relevant issue or discussion.
  • I have created tests covering the changes.
  • I have updated the documentation and checked the documentation preview.

Copy link

github-actions bot commented Nov 17, 2024

Documentation preview for this PR (built with commit 21ff2e8; changes) is ready! 🎉
This preview will update shortly after each push to this PR.

@tscrim
Copy link
Collaborator

tscrim commented Nov 18, 2024

Do you have some timings?

@tscrim tscrim self-requested a review November 18, 2024 03:06
@fchapoton
Copy link
Contributor Author

fchapoton commented Nov 18, 2024

before :

sage: ans = Knot([[1, 5, 2, 4], [3, 7, 4, 6], [5, 3, 6, 2], [7, 13, 8, 12], [9, 
....: 18, 10, 19], [11, 15, 12, 14], [13, 9, 14, 8], [15, 22, 16, 1], [17, 20, 1
....: 8, 21], [19, 10, 20, 11], [21, 16, 22, 17]])
sage: g = ans.braid()
sage: g.Tietze()
( 1, 2, 3, 3, 3, -2, -1, 3, 3, -2, -3, -4, 5, -4, 3, 2, -4, -4, 3, -5, -4 )
sage: %timeit g.deformed_burau_matrix()
35.6 ms ± 1.17 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)

after :

sage: %timeit g.deformed_burau_matrix()
31.9 ms ± 87.7 µs per loop (mean ± std. dev. of 7 runs, 10 loops each)

So not very much faster (around 7%). But I was not expecting more.

For the square of g one gets 670 ms before and 621 ms after

Copy link
Collaborator

@tscrim tscrim left a comment

Choose a reason for hiding this comment

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

Thanks. It's still a >10% speedup, which is good. LGTM.

vbraun pushed a commit to vbraun/sage that referenced this pull request Dec 6, 2024
    
some refactoring work on deformed Burau matrix

to try to make it faster

(this is about investigating sagemath#38869)

### 📝 Checklist

- [x] The title is concise and informative.
- [x] The description explains in detail what this PR is about.
- [ ] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation and checked the documentation
preview.
    
URL: sagemath#38987
Reported by: Frédéric Chapoton
Reviewer(s): Travis Scrimshaw
vbraun pushed a commit to vbraun/sage that referenced this pull request Dec 8, 2024
    
some refactoring work on deformed Burau matrix

to try to make it faster

(this is about investigating sagemath#38869)

### 📝 Checklist

- [x] The title is concise and informative.
- [x] The description explains in detail what this PR is about.
- [ ] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation and checked the documentation
preview.
    
URL: sagemath#38987
Reported by: Frédéric Chapoton
Reviewer(s): Travis Scrimshaw
@vbraun vbraun merged commit 7a82dd0 into sagemath:develop Dec 8, 2024
19 of 23 checks passed
@fchapoton fchapoton deleted the work_on_Burau branch December 9, 2024 06:15
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