Skip to content

Commit f681c0f

Browse files
Merge pull request #606 from codeflash-ai/update-docs-1
Update docs
2 parents ae3c7ca + 782e285 commit f681c0f

File tree

5 files changed

+34
-31
lines changed

5 files changed

+34
-31
lines changed

docs/configuration.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: "Manual Configuration"
33
description: "Configure Codeflash for your project with pyproject.toml settings and advanced options"
44
icon: "gear"
5-
sidebarTitle: "Configuration"
5+
sidebarTitle: "Manual Configuration"
66
keywords: ["configuration", "pyproject.toml", "setup", "settings", "pytest", "formatter"]
77
---
88

docs/docs.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88
"dark": "#1D4ED8"
99
},
1010
"favicon": "/favicon.ico",
11+
"integrations": {
12+
"intercom": {
13+
"appId": "ljxo1nzr"
14+
}
15+
},
1116
"navigation": {
1217
"tabs": [
1318
{
@@ -26,7 +31,7 @@
2631
]
2732
},
2833
{
29-
"group": "🔧 CI/CD Integration",
34+
"group": "🔧 Continuous Optimization",
3035
"pages": [
3136
"getting-started/codeflash-github-actions",
3237
"optimizing-with-codeflash/optimize-prs",

docs/getting-the-best-out-of-codeflash.mdx

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,26 @@ keywords: ["best practices", "tips", "github actions", "tracer", "optimization",
88

99
# Getting the best out of Codeflash
1010

11-
Codeflash is a powerful tool; here are our recommendations, tips and tricks on getting the best out of it. We do these ourselves, so we hope you will too!
11+
Codeflash is a powerful tool; here are our recommendations based on how the Codeflash team uses Codeflash.
1212

1313
### Install the Github App and actions workflow
1414

1515
After you install Codeflash on an actively developed project, [installing the GitHub App](getting-started/codeflash-github-actions) and setting up the
1616
GitHub Actions workflow will automatically optimize your code whenever new pull requests are opened. This ensures you get the best version of any changes you make to your code without any extra effort. We find that PRs are also the best time to review these changes, because the code is fresh in your mind.
1717

18+
### Find and optimize entire scripts with the Codeflash Tracer
19+
20+
Find the best results by running [Codeflash Optimize](optimizing-with-codeflash/trace-and-optimize) on your script to optimize it.
21+
This internally runs a profiler, captures inputs to all the functions your script calls, and uses those inputs to create Replay tests and benchmarks.
22+
The optimizations you get with this method, show you how much faster your workflow will get plus guarantee that your workflow won't break if you merge in the optimizations.
23+
24+
###
25+
1826
### Find optimizations on your whole codebase with `codeflash --all`
1927

2028
If you have a lot of existing code, run [`codeflash --all`](optimizing-with-codeflash/codeflash-all) to discover and fix any
2129
slow code in your project. Codeflash will open new pull requests for any optimizations it finds, and you can review and merge them at your own pace.
2230

23-
### Find and optimize bottlenecks with the Codeflash Tracer
24-
25-
Find the best results by running [Codeflash Tracer](optimizing-with-codeflash/trace-and-optimize) on the entry point of your script before optimizing it. The Codeflash Tracer will generate a trace file and a Replay Test file that will help Codeflash understand the behavior & inputs of your functions and generate the highest quality optimizations.
2631

2732
### Review the PRs Codeflash opens
2833

docs/index.mdx

Lines changed: 16 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,10 @@ sidebarTitle: "Overview"
66
keywords: ["python", "performance", "optimization", "AI", "code analysis", "benchmarking"]
77
---
88

9-
Welcome! Codeflash is an AI performance optimizer for Python code.
109
Codeflash speeds up Python code by figuring out the best way to rewrite your code while verifying that the behavior of the code is unchanged.
1110

12-
The optimizations Codeflash finds are generally better algorithms, opportunities to remove wasteful compute, better logic, and utilization of more efficient library methods. Codeflash
13-
does not modify the architecture of your code, but it tries to find the most efficient implementation of that architecture.
14-
15-
### How does Codeflash verify correctness?
16-
17-
Codeflash verifies the correctness of the optimizations it finds by generating and running new regression tests, as well as any existing tests you may already have. Codeflash tries to ensure that your
18-
code behaves the same way before and after the optimization.
19-
This offers high confidence that the behavior of your code remains unchanged.
20-
21-
### Continuous Optimization
22-
23-
Because Codeflash is an automated process, you can install it as a GitHub action and have it optimize the new code on every pull request.
24-
When Codeflash finds an optimization, it will ask you to review it. It will write a detailed explanation of the changes it made, and include all relevant info like % speed increase and proofs of correctness.
25-
26-
This is a great way to ensure that your code, your team's code and your AI Agent's code are optimized for performance before it causes a performance regression. We call this *Continuous Optimization*.
11+
The optimizations Codeflash finds are generally better algorithms, opportunities to remove wasteful compute, better logic, utilizing caching and utilization of more efficient library methods. Codeflash
12+
does not modify the system architecture of your code, but it tries to find the most efficient implementation of that architecture.
2713

2814
### Features
2915

@@ -35,34 +21,41 @@ This is a great way to ensure that your code, your team's code and your AI Agent
3521
```
3622
</Card>
3723

38-
<Card title="Trace & Optimize Workflows" icon="route" href="/optimizing-with-codeflash/trace-and-optimize">
24+
<Card title="Optimize Workflows with Tracing" icon="route" href="/optimizing-with-codeflash/trace-and-optimize">
3925
End-to-end optimization of entire Python workflows with execution tracing.
4026
```bash
4127
codeflash optimize myscript.py
4228
```
4329
</Card>
4430

45-
<Card title="Optimize Your Entire Codebase" icon="database" href="/optimizing-with-codeflash/codeflash-all">
31+
<Card title="Optimize Your Entire Codebase" icon="globe" href="/optimizing-with-codeflash/codeflash-all">
4632
Automatically optimize all functions in your project with comprehensive analysis.
4733
```bash
4834
codeflash --all
4935
```
5036
</Card>
5137

5238
<Card title="Optimize Pull Requests" icon="git-pull-request" href="/optimizing-with-codeflash/optimize-prs">
53-
Automatically optimize code changes in pull requests with GitHub Actions integration.
39+
Automatically find optimization code changes in Pull Requests with GitHub Actions integration.
5440
```bash
5541
codeflash init-actions
5642
```
5743
</Card>
5844
</CardGroup>
5945

46+
### How does Codeflash verify correctness?
47+
48+
Codeflash verifies the correctness of the optimizations it finds by generating and running new regression tests, as well as any existing tests you may already have. Codeflash tries to ensure that your
49+
code behaves the same way before and after the optimization.
50+
This offers high confidence that the behavior of your code remains unchanged.
51+
52+
### Continuous Optimization
6053

61-
## How to use these docs
54+
Because Codeflash is an automated process, the main way to use it is by installing it as a GitHub action and have it optimize the new code on every pull request.
55+
When Codeflash finds an optimization, it will ask you to review it. It will write a detailed explanation of the changes it made, and include all relevant info like % speed increase and proofs of correctness.
6256

63-
On the left side of the screen, you'll find the docs navigation bar.
64-
Start by installing Codeflash, then explore the different ways of using it to optimize your code.
57+
This is a great way to ensure that your code, your team's code and your AI Agent's code are optimized for performance before it causes a performance regression. We call this *Continuous Optimization*.
6558

6659
## Questions or Feedback?
6760

68-
Your feedback will help us make codeflash better, faster. If you have any questions or feedback, use the Intercom button in the lower right, join our [Discord](https://www.codeflash.ai/discord), or drop us a note at [[email protected]](mailto:founders@codeflash.ai) - we read every message!
61+
Your feedback will help us make codeflash better, faster. If you have any questions or feedback, use the Intercom button in the lower right, join our [Discord](https://www.codeflash.ai/discord), or drop us a note at [[email protected]](mailto:contact@codeflash.ai) - we read every message!

docs/optimizing-with-codeflash/trace-and-optimize.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ This powerful command creates high-quality optimizations, making it ideal when y
2424

2525
The generated replay tests and the trace file are for the immediate optimization use, don't add them to git.
2626

27-
## Codeflash optimize demo (1 min)
27+
## Codeflash optimize 1 min demo
2828

29-
<iframe width="750" height="460" src="https://www.youtube.com/embed/_nwliGzRIug" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
29+
<iframe width="640" height="400" src="https://www.youtube.com/embed/_nwliGzRIug" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
3030

3131

3232
## What is the codeflash optimize command?

0 commit comments

Comments
 (0)