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

replace the :continue option with a #continue_lex method #1151

Merged
merged 3 commits into from
Jun 3, 2019

Conversation

jneen
Copy link
Member

@jneen jneen commented Jun 3, 2019

This has the following advantages:

  • reduces calls to #assert_utf8! (was previously called for every delegation!)

  • avoids the hash object creation

  • avoids the control coupling code smell of a special boolean parameter to avoid some parts of the processing.

This has the following advantages:

* reduces calls to #assert_utf8! (was previously called
  for every delegation!)

* avoids the hash object creation

* avoids the control coupling code smell of a special
  boolean parameter to avoid some parts of the processing.
@pyrmont pyrmont added the needs-review The PR needs to be reviewed label Jun 3, 2019
lib/rouge/lexer.rb Outdated Show resolved Hide resolved
@ashmaroli
Copy link
Contributor

I don't mean to be overly picky but wouldn't *args cause array allocations and &block proc allocations..? It'd be dope if they could be avoided altogether..
Perhaps a TODO for 4.0.0

@pyrmont pyrmont merged commit 27d08a3 into master Jun 3, 2019
@pyrmont pyrmont removed the needs-review The PR needs to be reviewed label Jun 3, 2019
@tancnle tancnle deleted the perf.continue branch September 22, 2021 12:24
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