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

perf(ext/websocket): special op for sending binary data frames #18506

Merged
merged 2 commits into from
Mar 30, 2023

Conversation

littledivy
Copy link
Member

Easy perf win by avoiding deserializing SendValue through serde_v8.

name avg msg/sec/core
deno_main 127820.750000
deno_this 140079.000000

@aapoalas
Copy link
Collaborator

Should the ws_send op be turned into send_string as well?

@littledivy
Copy link
Member Author

@aapoalas #18507

@littledivy littledivy enabled auto-merge (squash) March 30, 2023 14:41
littledivy added a commit that referenced this pull request Mar 30, 2023
Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

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

LGTM

@littledivy littledivy merged commit 30ee846 into denoland:main Mar 30, 2023
@bartlomieju bartlomieju deleted the binary_op branch March 30, 2023 22:05
littledivy added a commit that referenced this pull request Mar 31, 2023
Use u16 to represent the kind of event (0 - 6) & event code > 6 is
treated as the close code. This way we can represent all events + the
close code in a single JS number. This is safe because (as per RFC 6455)
close code from 0-999 are reserved & not used.

| name | avg msg/sec/core |
| --- | --- |
| deno_main | `127820.750000` |
| deno #18506 | `140079.000000` |
| deno #18506 + this | `150104.250000` |
littledivy added a commit that referenced this pull request Mar 31, 2023
This commit adds a new core API `opAsync2` to call an async op with
atmost 2 arguments. Spread argument iterators has a pretty big perf hit
when calling ops.

| name | avg msg/sec/core |
| --- | --- |
| 1.32.1 | `127820.750000` |
| #18506 | `140079.000000` |
| #18506 + #18509 | `150104.250000` |
| #18506 + #18509 + this | `157340.000000` |
mmastrac pushed a commit that referenced this pull request Mar 31, 2023
mmastrac pushed a commit that referenced this pull request Mar 31, 2023
Easy perf win by avoiding deserializing `SendValue` through serde_v8. 

| name | avg msg/sec/core |
| --- | --- |
| deno_main | `127820.750000` |
| deno_this | `140079.000000` |
mmastrac pushed a commit that referenced this pull request Mar 31, 2023
Use u16 to represent the kind of event (0 - 6) & event code > 6 is
treated as the close code. This way we can represent all events + the
close code in a single JS number. This is safe because (as per RFC 6455)
close code from 0-999 are reserved & not used.

| name | avg msg/sec/core |
| --- | --- |
| deno_main | `127820.750000` |
| deno #18506 | `140079.000000` |
| deno #18506 + this | `150104.250000` |
mmastrac pushed a commit that referenced this pull request Mar 31, 2023
This commit adds a new core API `opAsync2` to call an async op with
atmost 2 arguments. Spread argument iterators has a pretty big perf hit
when calling ops.

| name | avg msg/sec/core |
| --- | --- |
| 1.32.1 | `127820.750000` |
| #18506 | `140079.000000` |
| #18506 + #18509 | `150104.250000` |
| #18506 + #18509 + this | `157340.000000` |
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.

None yet

3 participants