课程: Advanced AI Analytics on AWS: Amazon Bedrock, Q, SageMaker Data Wrangler, and QuickSight

免费学习该课程!

今天就开通帐号,24,700 门业界名师课程任您挑!

Converting Python analytics code to Rust using GenAI

Converting Python analytics code to Rust using GenAI

- [Instructor] Here we have a Python Rust performance race. In this example I have a Fibonacci computation and we run it in Python and it takes 13.5 seconds and Rust, it's about a fifth of a second. And if we do a simulation, you can see that it's just running laps around the Python version of the code. And there's a pretty big difference in this particular version. So you can make the argument, well just use some other C library or rewrite it in C, et cetera. But you could also make the argument, why not just use one language? Why not not have to deal with packaging and have a binary that is extremely fast and also very secure because it's a modern compiled language. So there are some pretty significant problems with legacy scripting languages like Python that Rust fix. So how would we do this? Here we have DeepSeek, and in this case, DeepSeek allows us to paste some Python code in and we can say, you know, convert to Rust for example, we can say, you know, this is slow. Give me a…

内容