Skip to content

Commit

Permalink
Revert "feat: massive optimizations"
Browse files Browse the repository at this point in the history
This reverts commit d8eb6c1.
  • Loading branch information
JairusSW committed Jul 2, 2024
1 parent d8eb6c1 commit 44510e5
Show file tree
Hide file tree
Showing 26 changed files with 8,970 additions and 6,248 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,21 +190,21 @@ My library beats JSON (written in C++) on all counts *and*, I see many places wh

Serialization Benchmarks:

| Value | JavaScript (ops/s) | JSON-AS (ops/s) | JSON-AS (Pages) | JSON-AS (SIMD+Pages)| Max Throughput |
|----------------------------|--------------------|--------------------|---------------------|---------------------|----------------|
| "hello world" | 7,124,361 | 44,290,480 (6.2x) | 73,601,235 (10.3x) | NOT IMPLEMENTED | 1.91 GB/s |
| 12345 | 9,611,677 | 66,900,642 (6.9x) | 145,924,333 (15.2x) | NOT IMPLEMENTED | 0.58 GB/s |
| 1.2345 | 7,227,259 | 20,322,939 (2.8x) | NOT IMPLEMENTED | NOT IMPLEMENTED | 0.16 GB/s |
| [[],[[]],[[],[[]]]] | 5,655,429 | 34,453,102 (6.0x) | NOT IMPLEMENTED | NOT IMPLEMENTED | 1.32 GB/s |
| { x: f64, y: f64, z: f64 } | 3,878,604 | 44,557,996 (11.5x) | 113,203,242 (29.2x) | 172,023,231 (44.4x) | 8.61 GB/s |
| Value | JavaScript (ops/s) | JSON-as (ops/s) | Difference |
|----------------------------|--------------------|-----------------|------------|
| "hello world" | 28,629,598 | 64,210,666 | + 124% |
| 12345 | 31,562,431 | 56,329,066 | + 78% |
| 1.2345 | 15,977,278 | 20,322,939 | + 27% |
| [[],[[]],[[],[[]]]] | 8,998,624 | 34,453,102 | + 283% |
| { x: f64, y: f64, z: f64 } | 15,583,686 | 17,604,821 | + 12% |



Deserialization Benchmarks:

| Value | JavaScript (ops/s) | JSON-AS (ops/s) | Difference|
|----------------------------|--------------------|-----------------|-----------|
| "hello world" | 10,571,462 | 24,274,496 | + 98% |
| "hello world" | 12,210,131 | 24,274,496 | + 98% |
| "12345" | 21,376,873 | 254,640,930 | + 1,191% |
| 1.2345 | 23,193,902 | 221,869,840 | + 987% |
| [[],[[]],[[],[[]]]] | 4,777,227 | 74,921,123 | + 1,568% |
Expand Down
135 changes: 0 additions & 135 deletions assembly/bl.ts

This file was deleted.

14 changes: 0 additions & 14 deletions assembly/chars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,17 +74,3 @@
@inline export const FORM_FEED = 12; // \f
// @ts-ignore: Decorator is valid here
@inline export const CARRIAGE_RETURN = 13; // \r

export const TRUE_PTR = changetype<usize>("true");
export const FALSE_PTR = changetype<usize>("false");
export const NULL_PTR = changetype<usize>("null");
export const EMPTY_BRACES_PTR = changetype<usize>("{}");
export const EMPTY_BRACKET_PTR = changetype<usize>("[]");
export const EMPTY_QUOTE_PTR = changetype<usize>("\"\"");
export const BACKSPACE_PTR = changetype<usize>("\\b");
export const TAB_PTR = changetype<usize>("\\t");
export const NEW_LINE_PTR = changetype<usize>("\\n");
export const FORM_FEED_PTR = changetype<usize>("\\f");
export const CARRIAGE_RETURN_PTR = changetype<usize>("\\r");
export const FOUR_DIGIT_ESC_PTR = changetype<usize>("\\u000");
export const TWO_DIGIT_ESC_PTR = changetype<usize>("\\u00");
Loading

0 comments on commit 44510e5

Please sign in to comment.