-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
similarity_search Rust #456
Conversation
I propose to consider the possibility of implementing the task using the Rust programming language and the functionality and recommendations available in CluadFlare. I propose a solution for consideration. 1712n#431
Could you explain the advantage of switching from TS to Rust to solve the batching challenge? Are there any cost calculations or test results that support your reasoning? |
Switching from TypeScript (TS) to Rust for solving the batching challenge in a Cloudflare Worker can offer several advantages, particularly in terms of performance, safety, and resource efficiency. Below, I’ll outline these advantages and how they might impact cost calculations and performance metrics. Advantages of Switching from TypeScript to Rust
Cost Calculations and Test ResultsTo support the reasoning behind switching from TS to Rust, it’s useful to perform cost and performance analyses. Here’s how you might approach this:
Example Test ResultsSuppose you conducted benchmarks and found the following results:
Cost Calculation ExampleAssume the cost per 1 million requests based on execution time and resource usage:
Switching to Rust results in half the execution time, reducing the cost per request and improving overall system performance. Additionally, lower resource utilization might allow you to use less expensive Cloudflare Worker plans or handle more traffic on the same plan, leading to further cost savings. ConclusionSwitching from TypeScript to Rust for the batching challenge can yield significant performance improvements, cost savings, and increased reliability. The benefits of Rust’s performance, memory safety, and concurrency model provide compelling reasons for the switch, supported by concrete cost and performance metrics. |
Thank you for your suggestion to switch our Cloudflare Worker from TypeScript to Rust. I appreciate you taking the time to research and propose potential improvements to our stack. However, after carefully reviewing the information you provided, I don't believe it adequately justifies the significant effort and risk involved in changing our existing TypeScript implementation to Rust. The comparison you shared, while informative about the general characteristics of TypeScript and Rust, does not directly address the specific technical challenges and requirements of our Cloudflare Worker. It reads more like a high-level language comparison rather than a targeted analysis of how Rust would concretely benefit our particular use case, codebase, and constraints. To properly evaluate a major language and toolchain change like this, we would need to see:
I'm not saying Rust is necessarily the wrong choice, but we need to do our due diligence and build confidence that it's the right choice for this particular challenge. The current rationale doesn't meet that bar. |
Thank you for our conversation. You are right and I understand you intentions. It is interested what are you doing. Because I am not so deeply involved in your activity I try to be useful and provide easy way to communicate with you. As I see you expect deeply involvement at start (with deeply research). I am not ready for such competitions. I just would liked share my knowledge. Good luck! |
I propose to consider the possibility of implementing the task using the Rust programming language and the functionality and recommendations available in CluadFlare. I propose a solution for consideration. #431