Giter VIP home page Giter VIP logo

Comments (3)

slifin avatar slifin commented on June 3, 2024

This comment could be very presumptuous on my part, but it sounds like you don't know what the performance issue is at the moment (I don't either) the danger with this scenario will be guessing solutions and potentially wasting effort when you find the guesses + implementation aren't fruitful

Sounds like an ideal time to try and profile code: https://stackoverflow.com/questions/2974916/profiling-tool-for-clojure hope this helps

from parcera.

carocad avatar carocad commented on June 3, 2024

This comment could be very presumptuous on my part

@slifin not at all. At least I dont perceive it like that :)

Sounds like an ideal time to try and profile code: https://stackoverflow.com/questions/2974916/profiling-tool-for-clojure hope this helps

I know the options to profiel clojure code already and I am using VisualVm 😅. The problem is that base on my experience with profiling Clojure, lazy sequence are very difficul to profile because the "work" doesnt happen inmediately but it is differred to the consumer.

Furthermore, in this case the transformation is deeply recursive so I dont know if keeping all those elements on the stack can affect performance or not. On the other hand, Clojure immutable collections are ihnerently slower than java/js mutable ones so for upmost performance that might be an option. The question is then which bullet would I have to take ?

from parcera.

carocad avatar carocad commented on June 3, 2024

closing this.

After several checks I found out that the convertion between antlr objects and clojure ones was not the issue. The issue was that I was measuring the roundtrip of source code -> ast -> source code which is of course not representative of the source code -> ast transformation.

The roundtrip does in fact take much longer than plain ast creation.

However, plain ast creation takes around 30 ms on my machine for the clojure.core namespace and traversing it with tree-seq only adds a couple milliseconds more.

If anyone else finds some performance issues please let me know.

from parcera.

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.