Coder Social home page Coder Social logo

Comments (6)

zwaldowski avatar zwaldowski commented on August 11, 2024

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.

lyricsboy avatar lyricsboy commented on August 11, 2024

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.

jgallagher avatar jgallagher commented on August 11, 2024

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.

mdmathias avatar mdmathias commented on August 11, 2024

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.

jgallagher avatar jgallagher commented on August 11, 2024

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.

jgallagher avatar jgallagher commented on August 11, 2024

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 Strings are slower.

from freddy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.