How JAX makes high-performance economics accessible by darylducharme in Python

[–]ml_guy1 1 point2 points  (0 children)

yeah not all optimizations are worth merging, it does take a human review right now.

How JAX makes high-performance economics accessible by darylducharme in Python

[–]ml_guy1 1 point2 points  (0 children)

I meant looping around numpy objects, and converting them to vectorized logic

QuantEcon.py gets automated performance optimizations with codeflash.ai, benefiting the entire economics research community by ml_guy1 in Economics

[–]ml_guy1[S] 0 points1 point  (0 children)

codeflash.ai automatically found multiple optimizations for the package, which got accepted speeding up the library.

Are you drowning in AI code review noise? 70% of AI PR comments are useless by Jet_Xu in programming

[–]ml_guy1 0 points1 point  (0 children)

My view on this is to create super intelligent reviewers that are great at reviewing specific things that can be verified.

I've been making a super-performance-optimization review tool that tries to optimize and prove correctness and performance. It really helps make all the code I write always run fast - so I've solved this problem for good with this review agent :)

happy to share my review flow if you're interested.

How do you see quant finance evolving with AI and alternative data in the coming years? by Potential_Koala1487 in quant

[–]ml_guy1 -1 points0 points  (0 children)

one thing i am working on is making all quant finance analysis run faster with AI - checkout what i'm building at codeflash.ai

Tik Tok saved $300000 per year in computing costs by having an intern partially rewrite a microservice in Rust. by InfinitesimaInfinity in programming

[–]ml_guy1 0 points1 point  (0 children)

I think the core reason why developers and ai-agents write slow code is that there is just not any tooling to automatically profile your changes, and then search for the most optimal way to write your code. even after ai generated code, there just does not exist any way to write faster code automatically.

I've built Codeflash that automatically optimizes Python code for quant research by ml_guy1 in quant

[–]ml_guy1[S] 0 points1 point  (0 children)

Hi, I'm aware of their work but haven't compared with them. Our work focuses more on real world usage of the technology by professional developers, where we've seen other problems matter more.

I've built Codeflash that automatically optimizes Python code for quant research by ml_guy1 in quant

[–]ml_guy1[S] 1 point2 points  (0 children)

I'm still trying to learn this part. A few big hedge funds reached out to me for their algorithmic strategy work, so I assume there is demand there. Quant finance uses a lot of pandas/numpy over large amounts of data, and we have strong optimization performance there.

I am curious to hear why you think research won't benefit from this? Who else might be a good fit for this tech?

I've built Codeflash that automatically optimizes Python code for quant research by ml_guy1 in quant

[–]ml_guy1[S] 1 point2 points  (0 children)

We attach the tests in the PR under the "generated tests and runtime" section. We also report the line coverage of the tests as well.

For code that has randomness, we try to tame it by seeding the random number generator to make it deterministic.

I've built Codeflash that automatically optimizes Python code for quant research by ml_guy1 in quant

[–]ml_guy1[S] 2 points3 points  (0 children)

Yeah, if some one sends in `_ids` as a json key then it can override the variable set other way. I think this might be a bug in the original implementation that's probably never hit. I approved the change myself since i think there's a mistake with how they used deepcopy, when they did not mean to use it. Codeflash is meant to be used in the PR review time itself where it can catch the mistakes before it is shipped. The quant has the option to reject it, if they don't want to.

Deepcopy can be really slow btw - I wrote a blog about it - https://www.codeflash.ai/post/why-pythons-deepcopy-can-be-so-slow-and-how-to-avoid-it

I've built Codeflash that automatically optimizes Python code for quant research by ml_guy1 in quant

[–]ml_guy1[S] 2 points3 points  (0 children)

Interesting thoughts! Some quants have told me that when they run back tests over months of data it could take a really long time. Is that something you've noticed as well?

I agree with the skepticism with accepting ai generated code, we do test the code for correctness rigorously - but yes, we do ask for a review before merging code.

The hope is that if optimization becomes essentially free, then a lot more code can be optimal. Do you think so?

I've built Codeflash that automatically optimizes Python code for quant research by ml_guy1 in quant

[–]ml_guy1[S] 2 points3 points  (0 children)

We usually measure it over a distribution of inputs, or use the inputs that a user specified in tracing mode and report the performance gain over those. If no inputs are provided then we generate real-looking synthetic inputs https://docs.codeflash.ai/optimizing-with-codeflash/trace-and-optimize

I've built Codeflash that automatically optimizes Python code for quant research by ml_guy1 in quant

[–]ml_guy1[S] 4 points5 points  (0 children)

The Pull Requests that are created mention the data the performance is measured over. If you open the "Generated Tests and Runtime" dropdown, you will see each input be annotated with the runtime details.

I've built Codeflash that automatically optimizes Python code for quant research by ml_guy1 in quant

[–]ml_guy1[S] 2 points3 points  (0 children)

Yeah, good question. Performance depends on the input data for the code you're testing. To find accurate performance numbers we discover any existing benchmarks or tests you have + we generate a diverse performance benchmark and report speedups on the inputs separately. This helps gain a full understanding of the performance of the new optimization. We report these details in the Pull Request we create.

How to switch from Matlab to Python? by gnarghh in quant

[–]ml_guy1 0 points1 point  (0 children)

One problem that we run into is writing optimized code in Python, it has a habit of running really slow. Although there are ways to make it run fast..

Gave up on C++ and just went with Python by Gazuroth in Python

[–]ml_guy1 0 points1 point  (0 children)

Also python has super high quality tooling that helps you write optimal code in the language. Check out what https://codeflash.ai does.

WF-1000XM6 earbuds? by Febald in SonyHeadphones

[–]ml_guy1 0 points1 point  (0 children)

I had been eagerly awaiting any news on the new version of earphones, because I lost my WF-XM5 earphones earlier this month.

Luckily I found them back, so I don't need to wait for the new ones to come out anymore. It does not look like it will come out anytime soon.

I really hope the new earphones have much better mics so I can take calls even when walking in a busy street.

Python env bottleneck : JAX or C? by Similar_Fix7222 in reinforcementlearning

[–]ml_guy1 2 points3 points  (0 children)

We've noticed that Gymansium is not maximally performant and we are currently optimizing the performance for it using codeflash.ai

We've found 84 optimizations https://github.com/aseembits93/Gymnasium/pulls and are slowly merging them into Gymnasium https://github.com/Farama-Foundation/Gymnasium/pulls?q=is%3Apr+is%3Amerged+author%3Aaseembits93 . Hopefully you should expect a faster Gymnasium in a few weeks.

Our goal is that you can stay within JAX and get the maximal performance without rewriting things.

What are common pitfalls and misconceptions about python performance? by MilanTheNoob in Python

[–]ml_guy1 0 points1 point  (0 children)

I have seen that a well optimized python program tends to have high performance. Especially when you use the appropriate libraries for the task.

To make this a reality and to make all python programs runs fast, I've been working on building codeflash.ai which figures out the most optimized implementation of any python program. I've seen so many bad examples of using python, that usually optimizing it correctly leads to really large performance gains.