Skip to content

Some more performance optimization changes#2

Open
firstuserhere wants to merge 2 commits intodiatkinson:masterfrom
firstuserhere:master
Open

Some more performance optimization changes#2
firstuserhere wants to merge 2 commits intodiatkinson:masterfrom
firstuserhere:master

Conversation

@firstuserhere
Copy link
Copy Markdown
Contributor

  1. precompile the regex for the escape function (minor but hey)
  2. vectorize operations in color_tokens
  3. optional ScatterGL support

tbd : formatted_next_tokens should be optimized (Currently all tokens would take O(n logn) time) (Use NumPy for Sorting Instead of Python’s sort, minimize string operations, Cache the Output etc).

@diatkinson
Copy link
Copy Markdown
Owner

First two items seem great (thank you!) I'm a bit worried about (3), since it's ~30% slower on my machine (M1), and seems to display incorrectly, at least on my laptop screen.

Screenshot 2025-02-23 at 7 08 21 PM

I'm open to adding it as an option, but would prefer to have it disabled by default. How does that sound?

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.

2 participants