---
title: "Discussion on \"fmt vs sprintf vs stringstream 速度比較\" | Hashnode"
description: "Discussion on \"fmt vs sprintf vs stringstream 速度比較\". 目標\n粗略的比較這些字串拼接函數\n\nfmt::format: 並不是 c++20 的 std::format ，是在 ubuntu20.04 的 apt repo 裡面可以直接安裝的 libfmt-dev: 6.1.2\nstd::sprintf: c 本來就有的函數\nstd::stringstream: c++ 的另一種字串拼接方式\n\n由於我是在嘗試一個把混有字串和數字的 tuple 轉換成 st"
url: "https://hashnode.com/posts/fmt-vs-sprintf-vs-stringstream/628f7c6a9a7f929c55a4253c"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [fmt vs sprintf vs stringstream 速度比較](https://notes.mukyu.dev/fmt-vs-sprintf-vs-stringstream?utm_source=hashnode&utm_medium=feed)

目標 粗略的比較這些字串拼接函數 fmt::format: 並不是 c++20 的 std::format ，是在 ubuntu20.04 的 apt repo 裡面可以直接安裝的 libfmt-dev: 6.1.2 std::sprintf: c 本來就有的函數 std::stringstream: c++ 的另一種字串拼接方式 由於我是在嘗試一個把混有字串和數字的 tuple 轉換成 st

May 26, 2022 · 2 min read · notes.mukyu.dev  
Updated Oct 27  
Read the article

-   [#cpp](https://hashnode.com/tag/cpp)

## Written by

[Patchouli](https://hashnode.com/@mudream4869)

@mudream4869 · Uohout

  
[View profile](https://hashnode.com/@mudream4869)

工程師帕秋莉~

後端工程師。 不定時張貼一些寫扣時的筆記，有時英文，有時中文。 「如果，我是魔女的話...」

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
