forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit0a8de93
committed
Speed up lexing of long JSON strings
Use optimized linear search when looking ahead for end quotes,backslashes, and non-printable characters. This results in nearly 40%faster JSON parsing on x86-64 when most values are long strings, andall platforms should see some improvement.Reviewed by Andres Freund and Nathan BossartDiscussion:https://www.postgresql.org/message-id/CAFBsxsGhaR2KQ5eisaK%3D6Vm60t%3DaxhD8Ckj1qFoCH1pktZi%2B2w%40mail.gmail.comDiscussion:https://www.postgresql.org/message-id/CAFBsxsESLUyJ5spfOSyPrOvKUEYYNqsBosue9SV1j8ecgNXSKA%40mail.gmail.com1 parent0551912 commit0a8de93
3 files changed
+28
-3
lines changedLines changed: 10 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
19 | 19 |
| |
20 | 20 |
| |
21 | 21 |
| |
| 22 | + | |
22 | 23 |
| |
23 | 24 |
| |
24 | 25 |
| |
| |||
844 | 845 |
| |
845 | 846 |
| |
846 | 847 |
| |
847 |
| - | |
| 848 | + | |
848 | 849 |
| |
849 | 850 |
| |
850 | 851 |
| |
| |||
853 | 854 |
| |
854 | 855 |
| |
855 | 856 |
| |
856 |
| - | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
857 | 864 |
| |
858 | 865 |
| |
859 | 866 |
| |
860 |
| - | |
| 867 | + | |
861 | 868 |
| |
862 | 869 |
| |
863 | 870 |
| |
|
Lines changed: 13 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
42 | 42 |
| |
43 | 43 |
| |
44 | 44 |
| |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
45 | 58 |
| |
46 | 59 |
| |
47 | 60 |
| |
|
Lines changed: 5 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7 | 7 |
| |
8 | 8 |
| |
9 | 9 |
| |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
10 | 15 |
| |
11 | 16 |
| |
12 | 17 |
| |
|
0 commit comments
Comments
(0)