29

几个有用的 C++ 在线工具

 3 years ago
source link: https://mp.weixin.qq.com/s/LVjlr8hnZPzQjJjg_pakqQ
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

记录几个实用的在线工具~

Wandbox [1]

  1. 支持多种编程语言 * 多个编译器版本在线编译运行的网站。

  2. 可以在这里做方便、快速地一些小实验、尝试一些编程语言的新特性,比如 C++20。

YNvEBfm.png!mobile Wandbox

Quick C++ Benchmark [2]

  1. 可以快速对一些 C++ 代码片段进行 benchmark 并可视化显示出来。

  2. 支持多个版本的 clang 和 gcc。

  3. 背后用的应该是 google benchmark [3] 这个开源库,你也可以在自己的机器上安装这个库。

jYbqeq7.png!mobile Quick C++ Benchmark

Compiler Explorer [4]

  1. 支持将 C++ 代码编译成汇编代码。

  2. 支持多种编译器版本 * 多种 CPU 平台(x86-64、MIPS、ARM 等)。

2IFB73A.png!mobile Compiler Explorer

Compare C++ Builds [5]

  1. 可以测试、比较不同 C++ 代码的编译开销(CPU、内存、I/O)

ZZJZjaI.png!mobile Compare C++ Builds

C++ Insights [6]

  1. 主要用于看代码编译展开后的具体情况,是个学习 C++ 模板时不错的辅助工具。

FnQbAnB.png!mobile C++ Insights

参考资料

[1]

Wandbox: https://wandbox.org/

[2]

Quick C++ Benchmark: https://quick-bench.com/q/eP40RY6zDK-eJFdSSPBINa0apTM

[3]

google benchmark: https://github.com/google/benchmark

[4]

Compiler Explorer: https://gcc.godbolt.org/

[5]

Compare C++ Builds: https://build-bench.com/b/47ciR2_jQ0RuAt2fy1Pnk66b3yM

[6]

C++ Insights: https://cppinsights.io/


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK