GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — WIP events: optimize emit() by trevnorris · Pull Request #533 · nodejs/node

Conversation

@trevnorris

@trevnorris trevnorris commented Jan 21, 2015

Copy link
Copy Markdown
Contributor

EventEmitter#emit() can be called with many different arguments, but
there are a few that are most common. Increase performance by optimizing
those most common cases. It also drastically decreases the amount of
output from --trace_deopt.

This is a hyper optimization and will probably on save 100ns or so at actual runtime. One thing I find most advantageous is that --trace_deopt will show far less output.

There is still plenty that I would like to do. For example, implement a sort of IC in JS that will preempt what will be called. Would like feedback during development. Also one of the "message" tests is failing because of the change in the call stack. Will take care of that before WIP is removed.

R=@indutny

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
indutny
indutny reviewed Jan 21, 2015
View reviewed changes
Comment thread lib/events.js Outdated

@indutny indutny Jan 21, 2015

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Is there any difference between throw new Error and throw Error.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@trevnorris trevnorris Jan 21, 2015

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Think the specification states that will always return a new Error object regardless. But since I'm there might as well switch it up to use new.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@indutny

indutny commented Jan 21, 2015

Copy link
Copy Markdown
Member

Mostly LGTM if it boosts performance or at least does not kill it ;)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@trevnorris

trevnorris commented Jan 21, 2015

Copy link
Copy Markdown
Contributor Author

@indutny Thanks. I'm going to sleep on it. There's still more to do. I would like to further implement an in JS IC that can preemptively call the correct emit function.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@trevnorris
trevnorris force-pushed the ee-awesomeness-all-around branch 2 times, most recently from 5c1ba98 to 4672003 Compare January 21, 2015 00:40
dougwilson
dougwilson reviewed Jan 21, 2015
View reviewed changes
Comment thread lib/events.js Outdated

@dougwilson dougwilson Jan 21, 2015

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

I feel like the function name should reflect that you should !this._events.error before calling. Perhaps $emitUncaughtError?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@trevnorris trevnorris Jan 21, 2015

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

@dougwilson good point. thanks.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@trevnorris
WIP events: optimize emit()
77b0098
EventEmitter#emit() can be called with many different arguments, but
there are a few that are most common. Increase performance by optimizing
those most common cases. It also drastically decreases the amount of
output from --trace_deopt.
@trevnorris
trevnorris force-pushed the ee-awesomeness-all-around branch from 4672003 to 77b0098 Compare January 21, 2015 23:08
@charmander

charmander commented Jan 28, 2015

Copy link
Copy Markdown
Contributor

Is there a useful benchmark available?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@klaemo klaemo mentioned this pull request Feb 1, 2015
events: optimize various functions #601
Closed
@trevnorris

trevnorris commented Feb 6, 2015

Copy link
Copy Markdown
Contributor Author

Superseded by #601

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@trevnorris trevnorris closed this Feb 6, 2015
@trevnorris
trevnorris deleted the ee-awesomeness-all-around branch February 6, 2015 19:52
This was referenced Sep 13, 2021
[Snyk] Fix for 1 vulnerabilities solebox/node#24
Open
[Snyk] Fix for 1 vulnerabilities enterstudio/node#23
Open
[Snyk] Fix for 1 vulnerabilities s4sc/node#23
Open
@molllyn1 molllyn1 mentioned this pull request Jun 20, 2023
[Snyk] Fix for 1 vulnerabilities molllyn1/node#80
Open
@karencapiiro karencapiiro mentioned this pull request Jun 20, 2023
[Snyk] Security upgrade semver from 6.3.0 to 7.5.2 karencapiiro/node#11
Open
@AshdonG AshdonG mentioned this pull request Jun 20, 2023
[Snyk] Security upgrade semver from 6.3.0 to 7.5.2 AshdonG/node#9
Open
@Mcculloughj Mcculloughj mentioned this pull request Jun 20, 2023
[Snyk] Security upgrade semver from 5.7.1 to 7.5.2 Mcculloughj/node#64
Open
@awaisab172 awaisab172 mentioned this pull request Jun 20, 2023
[Snyk] Fix for 1 vulnerabilities awaisab172/node#45
Open
@aliscco aliscco mentioned this pull request Jun 20, 2023
[Snyk] Security upgrade semver from 6.3.0 to 7.5.2 aliscco/alisco-node#424
Open
@dannybrown13 dannybrown13 mentioned this pull request Jun 20, 2023
[Snyk] Security upgrade semver from 6.3.0 to 7.5.2 dannybrown13/node#27
Open
@ambai ambai mentioned this pull request Jun 20, 2023
[Snyk] Security upgrade semver from 6.3.0 to 7.5.2 ambai/node#15
Open
@ZRDK ZRDK mentioned this pull request Jun 20, 2023
[Snyk] Security upgrade semver from 6.3.0 to 7.5.2 ZRDK/node#8
Open
@leonardoadame leonardoadame mentioned this pull request Jun 20, 2023
[Snyk] Security upgrade semver from 6.3.0 to 7.5.2 leonardoadame/node#12
Merged
@s4sc s4sc mentioned this pull request Jun 21, 2023
[Snyk] Fix for 1 vulnerabilities s4sc/node#31
Open
@olegnn olegnn mentioned this pull request Jun 21, 2023
[Snyk] Security upgrade semver from 5.7.1 to 7.5.2 olegnn/node#44
Open
@KamilPolivka KamilPolivka mentioned this pull request Jun 21, 2023
[Snyk] Fix for 1 vulnerabilities KamilPolivka/node#29
Open
@saurabharch saurabharch mentioned this pull request Jun 21, 2023
[Snyk] Fix for 1 vulnerabilities saurabharch/node#32
Open
@jhudaz jhudaz mentioned this pull request Jun 21, 2023
[Snyk] Fix for 1 vulnerabilities jhudaz/node#52
Open
@saeedahassan saeedahassan mentioned this pull request Jun 21, 2023
[Snyk] Fix for 1 vulnerabilities saeedahassan/node#44
Open
@Mcculloughj Mcculloughj mentioned this pull request Jun 21, 2023
[Snyk] Security upgrade semver from 6.3.0 to 7.5.2 Mcculloughj/node#65
Open
@dannybrown13 dannybrown13 mentioned this pull request Jun 21, 2023
[Snyk] Security upgrade semver from 6.3.0 to 7.5.2 dannybrown13/node#29
Open
@fishbar fishbar mentioned this pull request Jun 21, 2023
[Snyk] Fix for 1 vulnerabilities fishbar/node-1#34
Open
@Qdigital Qdigital mentioned this pull request Jun 21, 2023
[Snyk] Fix for 1 vulnerabilities Qdigital/node#41
Open
@smclinden smclinden mentioned this pull request Jun 21, 2023
[Snyk] Security upgrade semver from 6.3.0 to 7.5.2 smclinden/node#10
Open
@AyushG3112 AyushG3112 mentioned this pull request Jun 22, 2023
[Snyk] Fix for 1 vulnerabilities AyushG3112/node#32
Open
@saeedahassan saeedahassan mentioned this pull request Jun 22, 2023
[Snyk] Security upgrade semver from 5.7.1 to 7.5.2 saeedahassan/node#45
Open
@karencapiiro karencapiiro mentioned this pull request Jun 22, 2023
[Snyk] Security upgrade semver from 6.3.0 to 7.5.2 karencapiiro/node#14
Open
@baophucct baophucct mentioned this pull request Jun 22, 2023
[Snyk] Fix for 1 vulnerabilities baophucct/node#35
Open
@BryanLaura BryanLaura mentioned this pull request Jun 22, 2023
[Snyk] Security upgrade semver from 6.3.0 to 7.5.2 BryanLaura/node#34
Open
@adamlaska adamlaska mentioned this pull request Jun 23, 2023
[Snyk] Fix for 1 vulnerabilities adamlaska/node#110
Open
This was referenced Jul 8, 2023
[Snyk] Security upgrade semver from 6.3.0 to 7.5.2 leonardoadame/node#100
Open
[Snyk] Fix for 4 vulnerabilities leonardoadame/node#133
Open
@leonardoadame leonardoadame mentioned this pull request Nov 29, 2023
[Snyk] Fix for 15 vulnerabilities leonardoadame/node#225
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@trevnorris @indutny @charmander @dougwilson
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.