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

60x slowdown between JS and Dartc #959

Closed
DartBot opened this issue Dec 25, 2011 · 4 comments
Closed

60x slowdown between JS and Dartc #959

DartBot opened this issue Dec 25, 2011 · 4 comments
Labels
closed-not-planned Closed as we don't intend to take action on the reported issue

Comments

@DartBot
Copy link

DartBot commented Dec 25, 2011

This issue was originally filed by [email protected]


I know it's a bit early to be worrying about performance, but I've encountered a 60x difference in speed between native JS and the JavaScript created by the Dart compiler.

What steps will reproduce the problem?

  1. Go to http://neil.fraser.name/temp/DartSpeed/SpeedtestJS.html
  2. Press "Compute Diff"
  3. Go to http://neil.fraser.name/temp/DartSpeed/SpeedtestDart.html
  4. Press "Compute Diff"

What is the expected output? What do you see instead?
SpeedtestJS.html takes 1.5 seconds (the exact time is printed at the bottom). SpeedTestDart.html takes 1.5 minutes. When running in the Dart VM, the same test takes 21 seconds.

What version of the product are you using? On what operating system?
Dart Editor 0.1.0.2001112130441, Chrome 16.0.912.63, MacOS X 10.7.2, MacBook Pro.

Please provide any additional information below.
I don't know what sort of profiling tools you have for Dart. Let me know if the issue is obvious, or if you need me to attempt to strip the code down to a minimal testcase. The code is attached.


Attachment:
DartSpeed.zip (255.76 KB)

@dgrove
Copy link
Contributor

dgrove commented Jan 2, 2012

(based on what I see, this benchmark was compiled with dartc, not frog)


Added Area-Compiler, Triaged labels.
Changed the title to: "60x slowdown between JS and Dartc".

@DartBot
Copy link
Author

DartBot commented Jan 5, 2012

This comment was originally written by [email protected]


Fraser, it looks like your JS output is the default, unoptimized output that is produced by dartc when used from the editor in incremental mode. We are looking to make this default to a more optimal form but in the meantime, can you try the Tools > "Generate Optimized JS" and see what that performance is like?

@DartBot
Copy link
Author

DartBot commented Jan 6, 2012

This comment was originally written by [email protected]


Ah, that's a bit better. Now it takes 56 seconds, which is only 37x slower than native JavaScript.

Attached is the generated code.


Attachment:
Speedtest.dart.app.js (341.61 KB)

@DartBot
Copy link
Author

DartBot commented Mar 28, 2012

This comment was originally written by [email protected]


dartc no longer generates JS.


Added WontFix label.

@kevmoo kevmoo added closed-not-planned Closed as we don't intend to take action on the reported issue and removed resolution-wont_fix labels Mar 1, 2016
copybara-service bot pushed a commit that referenced this issue Jun 12, 2023
Revisions updated by `dart tools/rev_sdk_deps.dart`.

dartdoc (https://github.com/dart-lang/dartdoc/compare/2a39574..5799424):
  57994242  2023-06-09  Parker Lougheed  Remove old <nodoc> syntax (#3261)

http (https://github.com/dart-lang/http/compare/5312366..ba7eb60):
  ba7eb60  2023-06-09  Brian Quinlan  Run common URLSessionTask tests on URLSessionWebSocketTask (#959)
  1746017  2023-06-09  Brian Quinlan  Support delegate methods for WebSocketTask (#958)

mockito (https://github.com/dart-lang/mockito/compare/cca4858..1d6064a):
  1d6064a  2023-06-09  Nate Bosch  Prepare to publish

webdev (https://github.com/dart-lang/webdev/compare/a6d761d..81ae77a):
  81ae77aa  2023-06-09  Elliott Brooks  Update Dart Debug Extension version in preparation for publishing (#2139)
  bb9265a0  2023-06-09  Elliott Brooks  Update DCM workflow (#2135)
  7652f646  2023-06-09  Elliott Brooks  Double the timeout for the webdev installation test (#2137)

Change-Id: I9d775bbb5c8a710a3339fa3434a95e8e0f2af75c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308760
Reviewed-by: Konstantin Shcheglov <[email protected]>
Commit-Queue: Konstantin Shcheglov <[email protected]>
Auto-Submit: Devon Carew <[email protected]>
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-not-planned Closed as we don't intend to take action on the reported issue
Projects
None yet
Development

No branches or pull requests

3 participants