Comments (3)
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.
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.
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)
- Consider supporting legacy NaN Inf, etc. HOT 1
- Fyi, made a babashka pod wrapping parcera HOT 1
- consider switching output format to enlive HOT 2
- consider migrating to deps.edn and plain cljs.main instead of figwheel
- consider splitting whitespace per line
- FYI: Made alc.x-as-tests which uses parcera HOT 1
- Comment and metadata issue HOT 3
- Octal characters HOT 1
- Things that can have metadata on them HOT 1
- Things that can be in metadata_entry
- consider splitting lexer and parser HOT 4
- deftype, defrecord, and constructor calls? HOT 6
- Another item in eval: conditional? HOT 1
- Radix numbers and optional 'N' suffix HOT 2
- Handling the sequence: number, discard, something HOT 9
- consider limiting conditional input
- Please consider adding a CHANGELOG HOT 2
- Some numbers that start with two or more zeros and end in 'M' HOT 1
- Tagged literal where literal is a set or some other forms 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 parcera.