Comments (6)
The second one (lazy) might help some, but then you might as well just be putting syntax sugar on top of NSDictionary
- you'd lose the safety of the enum. The third one might be workable (also: maybe look into one of the older ObjC ones), I can't find one quickly but it's gotta exist. The ultimate solution is the first one if you have the time to spare, but I imagine you don't.
from freddy.
Silly question, but have you compared in a release build?
On Apr 18, 2015, at 13:28, Zachary Waldowski [email protected]
wrote:
The second one (lazy) might help some, but then you might as well just be
putting syntax sugar on top of NSDictionary - you'd lose the safety of the
enum. The third one might be workable (also: maybe look into one of the
older ObjC ones), I can't find one quickly but it's gotta exist. The
ultimate solution is the first one if you have the time to spare, but I
imagine you don't.
—
Reply to this email directly or view it on GitHub
#10 (comment)
.
from freddy.
Yeah those timings were from a release build. Ounchecked didn't help either.
On Sat, Apr 18, 2015 at 1:34 PM, Brian Hardy [email protected]
wrote:
Silly question, but have you compared in a release build?
On Apr 18, 2015, at 13:28, Zachary Waldowski [email protected]
wrote:
The second one (lazy) might help some, but then you might as well just be
putting syntax sugar on top of NSDictionary - you'd lose the safety of the
enum. The third one might be workable (also: maybe look into one of the
older ObjC ones), I can't find one quickly but it's gotta exist. The
ultimate solution is the first one if you have the time to spare, but I
imagine you don't.
—
Reply to this email directly or view it on GitHub
#10 (comment).
Reply to this email directly or view it on GitHub:
#10 (comment)
from freddy.
That is a bummer. My sense is that a decent intermediate solution would be to try to make makeJSON
lazy somehow. I think a better, long term solution would be to make a pure JSON parser. I'd be happy to work on either or both.
from freddy.
Built #11 based off the JSON parser I started a while back. On my real project, it takes just under 0.5 seconds to parse the 1.5 MB JSON object (NSJSONSerialization is just under 0.2 seconds). That's close enough for me, at least for now.
from freddy.
Did a little more tuning today; down to just under .4 seconds. Frustrated that I can't get it lower, but I'm not sure what the problem is now. It's spending a fair amount of time in String.fromCStr
, but all the other mechanisms I've tried for creating String
s are slower.
from freddy.
Related Issues (20)
- [Help] Mapping a single element when an array is expected HOT 2
- Are there plans to continue development? HOT 1
- Update documentation
- How to Serialize Optional Vars HOT 3
- need to expose accessor that takes path as an array instead of variadic parameter HOT 2
- Implementing decimal support HOT 1
- Expose toJSONSerializationValue HOT 2
- Type decoding should be safe? HOT 1
- Payload notification HOT 5
- Podspec update? HOT 2
- Swift4c fails to build Freddy on release mode HOT 1
- Enable code coverage setting only for Debug builds - Xcode 9 issue
- does not compile with Xcode 9 HOT 5
- JSONParser in swift 4 is extremely slow for big data HOT 3
- Push 3.0.3 release to cocoapods master repo HOT 4
- CocoaPods: Requesting version '~> 3.0.2' installs version 3.0.3 HOT 1
- JSONSerialization.makeJSON fails on Linux due to no toll-free bridging HOT 1
- JSONParser.swift uses deprecated API when compiled against Swift 4.1 HOT 4
- 3.0 using deprecated API HOT 1
- Use typealias JString with external constructor versus String HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from freddy.