概述
由于所有的语言都需要对比,性能上都会习惯性的与C对比。C作为对比标准,这里简述C与Rust的区别。
结构
/* hello */# include <stdio.h>int main(){printf("hello, c and rust");return 0;}// gcc hello.c//[vscode] exited with code=0 in 0.231 seconds
fn main(){println!("hello,c and rust");}//exited with code=0 in 0.26 seconds//Rust 编译+运行和 C 时间上差不多
