Skip to content

Commit 7dd0b3c

Browse files
authored
Performance Tweaks (#13)
* move code files to src * Tweaks to make performance comparable to the standard library * I succeeded in making my thing perform well!! + other tweaks
1 parent 943435f commit 7dd0b3c

17 files changed

Lines changed: 518 additions & 334 deletions

‎.gitignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
.vscode/
2+
.DS_Store

‎iterator.go‎

Lines changed: 0 additions & 18 deletions
This file was deleted.

‎load.go‎

Lines changed: 0 additions & 268 deletions
This file was deleted.

‎log.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,9 @@ Know when to break the rules!
4242

4343
Probably need to make sure this handles unicode
4444

45+
So just found out my implementation is horribly slow for this input compared to the standard libraries implementation. I wonder why that is the
46+
case.
47+
48+
49+
So I looked at the official go package and I can't see any reason why mine should be significantly slower. I initially thought it could be that I used
50+
recursion but they used recursion too. I am trying out benchmarkig to figure this out.

‎readme.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ I wrote this to practise Go.
55

66
What's left?
77
* Handle whitespace ✅
8-
* Error handling
98
* Handle boolean and null literals ✅
109
* Handle number literals ✅
1110
* Handle string escapes ✅
12-
* Write the dump function - > (easy? how do we know the type of the object being pointed to?)
13-
* Benchmark against the standard libraries implementation
14-
* Study the standard libraries implementation
11+
* Benchmark against the standard libraries implementation ✅
12+
* Study the standard libraries implementation ✅
13+
* Error handling
1514
* Write about how I implemented the JSON spec in Go. Focus on what was difficult and what I learned.
15+
* Write the dump function - > (easy? how do we know the type of the object being pointed to?)

0 commit comments

Comments
 (0)