-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Comments
(based on what I see, this benchmark was compiled with dartc, not frog) Added Area-Compiler, Triaged labels. |
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? |
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: |
This comment was originally written by [email protected] dartc no longer generates JS. Added WontFix label. |
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 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?
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)
The text was updated successfully, but these errors were encountered: