Skip to content

c99 code, no jump tables, no gcc specifics#17

Open
nigoroll wants to merge 2 commits intoquartzjer:masterfrom
nigoroll:pr_case
Open

c99 code, no jump tables, no gcc specifics#17
nigoroll wants to merge 2 commits intoquartzjer:masterfrom
nigoroll:pr_case

Conversation

@nigoroll
Copy link

@nigoroll nigoroll commented Aug 27, 2018

I looked into js0n for some particular purpose (and I am still considering it for its simplicity) and, sort of as a by-product, rewrote it to not use the jump tables and gcc specifics. As is with default compiler options, this code is also somehow more efficient (15% or so).

On the way, I also noticed the limitations, which may be worth documenting more clearly

  • extraction only from the first object level
  • does not save context, so it will accept any terminator for arrays/objects as in {a:1, b:2] or [1,2,3}

I guess that's only scratching the surface, but at any rate, documenting the fact that for its great simplicity and speed, js0n by no means is a full parser.

Feel free to just close this PR if you want to keep the existing structure, but I did not want to miss the opportunity to share this code in case anyone is interested.

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.

1 participant