並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 30 件 / 30件

新着順 人気順

std string size cppの検索結果1 - 30 件 / 30件

  • TypeScriptやGoやRustでWebAssemblyウォークスルー - SMARTCAMP Engineer Blog

    みなさん、WebAssembly聞いたことありますよね? スマートキャンプでエンジニアをしている瀧川です。 私が初めてWebAssemblyを目にしたのは確か2018年、VimをWebAssemblyに移植してブラウザで動くようにしたという記事だったかなと思います。 https://github.com/rhysd/vim.wasm 当時は「はー、なんだか未来を感じるけど、どう使われてくんだろう」くらいな認識で、最近までほとんど注目していませんでした。 しかし、少し前にffmpeg.wasmについての記事がバズっているのを見かけたときビビっときましたね。 ブラウザ上でffmpegが動かせるのはWebアプリケーションを作る上で可能性が広がりますし、何よりWebAssemblyのポテンシャルが活かされていると感じました。 そこで今回、WebAssemblyの世界観を味わうために、代表的なWeb

      TypeScriptやGoやRustでWebAssemblyウォークスルー - SMARTCAMP Engineer Blog
    • bpftraceを使ってバイナリの謎の性能劣化を突き止めろ - Cybozu Inside Out | サイボウズエンジニアのブログ

      サイボウズ社内ではC++で開発している製品があります。 未知のバッファオーバーランなどの脆弱性への対策として、重要なコンポーネントについてはプロダクション環境で利用しているバイナリでも AddressSanitizer を有効にしてビルドしています。 その製品で利用しているコンパイラをgcc5.3.0からgcc7.5.0に更新したところ性能劣化が発生しました。 製品コードとは別の部分が原因のため、根本原因の追跡が難しそうです。perf,bpftraceを使って性能劣化を追いかけてみましょう。 本記事で利用しているAddressSanitizer, bpftrace, perfコマンドはネット上に良質な記事がありますので、使い方などの解説は今回は省略させていただきます。 gcc7.5.0において、性能劣化が発生する再現コードとして次のようなものを用意しました。 #include <strin

        bpftraceを使ってバイナリの謎の性能劣化を突き止めろ - Cybozu Inside Out | サイボウズエンジニアのブログ
      • neue cc - csbindgen - C#のためのネイティブコード呼び出し自動生成、或いはC#からのネイティブコード呼び出しの現代的手法について

        ネイティブコードとC#を透過的に接続するために、RustのFFIからC#のDllImportコードを自動生成するライブラリを作成し、公開しました。Cysharp初のRustライブラリです!先週にプレビューを出していましたが、しっかりした機能強化とReadMeの充実をして正式公開、です! Cysharp/csbindgen crates.io/crates/csbindgen めちゃくちゃスムーズにネイティブコードがC#から呼べるようになります。すごい簡単に。超便利。こりゃもうばんばんネイティブコード書きたくなりますね……!ただし書くコードはRustのみ対応です。いや、別にRustでいいでしょ、Rustはいいぞ……! しかしまず前提として言っておくと、ネイティブコードは別に偉くもなければ、必ず速いというわけでもないので、極力書くのはやめましょう。C#で書くべき、です。高速なコードが欲しければ

        • Changing std::sort at Google’s Scale and Beyond

          TL;DR; We are changing std::sort in LLVM’s libcxx. That’s a long story of what it took us to get there and all possible consequences, bugs you might encounter with examples from open source. We provide some benchmarks, perspective, why we did this in the first place and what it cost us with exciting ideas from Hyrum’s Law to reinforcement learning. All changes went into open source and thus I can

            Changing std::sort at Google’s Scale and Beyond
          • Nature Remo開発におけるテストフレームワーク『Catch2』の活用方法を紹介します - Nature Engineering Blog

            3日目! Nature Engineering Blog祭3日目は、ファームウェアエンジニアの中林 (id:tomo-wait-for-it-yuki) がお送りします。みなさま、自動テストはお好きですか?私は大好きです。手動で何度も同じことをテストするのは苦痛ですが、それをプログラミングのタスクに転化できるとなれば、最高ですよね! 今回はNature Remoのファームウェア開発で使用しているユニットテストフレームワーク『Catch2』の活用方法を紹介します。ESP-IDFで使えるテンプレートプロジェクトも用意してありますので、少し長いですが、最後まで楽しく読んでいただけると嬉しいです。 Catch2 Catch2は (modern) C++で書かれたユニットテストフレームワークです。Nature RemoのファームウェアはC言語で書いていますが、テストフレームワークはC++で書かれたも

              Nature Remo開発におけるテストフレームワーク『Catch2』の活用方法を紹介します - Nature Engineering Blog
            • 0.8.0 Release Notes ⚡ The Zig Programming Language

              Tier 4 Support § Support for these targets is entirely experimental. If this target is provided by LLVM, LLVM may have the target as an experimental target, which means that you need to use Zig-provided binaries for the target to be available, or build LLVM from source with special configure flags. zig targets will display the target if it is available. This target may be considered deprecated by

              • 0.10.0 Release Notes ⚡ The Zig Programming Language

                Tier 4 Support § Support for these targets is entirely experimental. If this target is provided by LLVM, LLVM may have the target as an experimental target, which means that you need to use Zig-provided binaries for the target to be available, or build LLVM from source with special configure flags. zig targets will display the target if it is available. This target may be considered deprecated by

                • How To Make a Fast Dynamic Language Interpreter

                  Original Zef Interpreter The original Zef interpreter was written with almost no regard for performance. Only two performance-aware choices were made: The value representation is a 64-bit tagged value that may hold a double, a 32-bit integer, or a Object*. Doubles are represented by offsetting them by 0x1000000000000 (a technique I learned from JavaScriptCore; the literature has taken to calling t

                  • strongly-typed-thoughts.net

                    Zig; what I think after months of using it What I like Arbitrary sized-integers and packed structs Generic types are just functions at the type level Error Union Types C interop is probably the best The build system is nice What I like less Error handling Shadowing is forbidden Compile-time duck typing No typeclasses / traits comptime is probably not as interesting as it looks No encapsulation Mem

                    • LLM推論を支える抽象化転送ライブラリ NVIDIA Inference Xfer Library (NIXL) について - NTT docomo Business Engineers' Blog

                      こんにちは、イノベーションセンターの鈴ヶ嶺です。 本記事では、NVIDIA Dynamo や vLLM などの LLM 推論フレームワーク向けに設計された高速・低遅延の抽象化転送ライブラリである NVIDIA Inference Xfer Library (NIXL) について解説します。 また、NVIDIA Dynamo に関してはこちらで解説していますので参考にしていただけると幸いです。 engineers.ntt.com まず、LLM 推論高速化(KV Cache)におけるメモリ転送の背景と課題をご紹介し、それを解決する NIXL の概要を説明します。 NIXL は Plugin により任意の転送方式を実装可能なアーキテクチャとなっています。実際に Custom Plugin を実装する方法についても紹介します。 背景と課題 NVIDIA Inference Xfer Library

                        LLM推論を支える抽象化転送ライブラリ NVIDIA Inference Xfer Library (NIXL) について - NTT docomo Business Engineers' Blog
                      • Wordlexpr: Wordle Compilation in C++20 - VittorOmeo

                        Not participating in the hype around Wordle seemed wrong, and what better way to do it than to create it cleanly at compile time in C++20? Introducing Wordlexpr! Let’s figure out how this magic works! Overview Wordlexpr is executed entirely at compile time – no executable is created, and the game itself is played through compiler errors. This requires three key tasks: Outputting random text to com

                          Wordlexpr: Wordle Compilation in C++20 - VittorOmeo
                        • C++ へようこそ - Modern C++

                          C++ は、作成以来、世界で最も広く使用されているプログラミング言語の 1 つになりました。 適切に記述された C++ プログラムは、高速で効率的です。 言語は他の言語よりも柔軟性が高く、最高レベルの抽象化で動作し、シリコンのレベルで動作します。 C++ によって、高度に最適化された標準ライブラリが提供されます。 これにより、低レベルのハードウェア機能にアクセスして、速度を最大化し、メモリ要件を最小限に抑えることができます。 C++ では、ゲーム、デバイス ドライバー、HPC、クラウド、デスクトップ、埋め込み、モバイル アプリなど、ほぼすべての種類のプログラムを作成できます。 他のプログラミング言語のライブラリやコンパイラさえも C++ で作成されます。 C++ の最初の要件の 1 つは、C 言語との下位互換性でした。 その結果、C++ を使用すると常に、生ポインター、配列、null で終

                            C++ へようこそ - Modern C++
                          • C++20's Extensions to Chrono Available in Visual Studio 2019 version 16.10 - C++ Team Blog

                            While the <chrono> header has been available as part of the STL since C++11, among the changes included in C++20 there were several extensions to chrono including support for calendrical types, time zones, leap seconds, and integration with format. A great deal of innovation and work was required in order to complete these additional features; shipping these new C++20 additions so soon would not h

                              C++20's Extensions to Chrono Available in Visual Studio 2019 version 16.10 - C++ Team Blog
                            • Safer Usage Of C++

                              Safer Usage Of C++ This document is PUBLIC. Chromium committers can comment on the original doc. If you want to comment but can’t, ping palmer@. Thanks for reading! Google-internal short link: go/safer-cpp Authors/Editors: adetaylor, palmer Contributors: ajgo, danakj, davidben, dcheng, dmitrig, enh, jannh, jdoerrie, joenotcharles, kcc, markbrand, mmoroz, mpdenton, pkasting, rsesek, tsepez, awhalle

                              • 397 行で tiny basic のインタプリタを作る - Qiita

                                言語実装 Advent Calendar 2022 の今日の分が空いていたので書いてみた。 この記事の内容 397 行の C++ のプログラムで tiny basic のインタプリタを実装する ソースコードは記事中に示す(1 ファイルのみで完結) 実装したタイニーベーシックのインタプリタ上で遊べる Hit & Blow というゲームも紹介 元ネタは、Peter Chapman さんの tinybasic.c ( https://gist.github.com/pmachapman/661f0fff9814231fde48 )。これを少々書き換えただけである。高度なことはしていない。 言語的にはコメントを付け加えるコマンド rem を追加している。元ネタは C であり、こちらは C++ を使っているので、vector や map を使って、若干コード量が減っているという感じ。行数を減らすため

                                  397 行で tiny basic のインタプリタを作る - Qiita
                                • A string formatting library in 65 lines of C++

                                  In this write-up, I will walk you through an implementation of a string formatting library for C++ I came up with for my video game. The end result came out really compact, at only 65 lines of code—providing a skeleton that can be supplemented with additional functionality at low cost. Usage Given a format buffer… char buffer[64]; String_Buffer buf = {str, sizeof str}; …the fmt::format function pr

                                  • Large Text Compression Benchmark

                                     Large Text Compression Benchmark Matt Mahoney Last update: Mar. 25, 2026. history This competition ranks lossless data compression programs by the compressed size (including the size of the decompression program) of the first 109 bytes of the XML text dump of the English version of Wikipedia on Mar. 3, 2006. About the test data. The goal of this benchmark is not to find the best overall compress

                                    • SizeBench: a new tool for analyzing Windows binary size - Performance and Diagnostics

                                      We’ve recently released a new tool called SizeBench, which helps investigate binary size for compiled native PE files such as DLLs and EXEs. This post will talk a bit about what the tool can do and how we’ve used it inside Microsoft over the past few years as it has been developed. You can download the tool now from the Microsoft Store – just click here to get started: https://aka.ms/SizeBench Tab

                                        SizeBench: a new tool for analyzing Windows binary size - Performance and Diagnostics
                                      • cuneicode, and the Future of Text in C

                                        Following up from the last post, there is a lot more we need to cover. This was intended to be the post where we talk exclusively about benchmarks and numbers. But, I have unfortunately been perfectly taunted and status-locked, like a monster whose “aggro” was pulled by a tank. The reason, of course, is due to a few folks taking issue with my outright dismissal of the C and C++ APIs (and not showi

                                          cuneicode, and the Future of Text in C
                                        • The Koka Programming Language

                                          1. Getting started Welcome to Koka – a strongly typed functional-style language with effect types and handlers. Why Koka? A Tour of Koka Install Discussion forum Github Libraries Note: Koka v3 is a research language that is currently under development and not ready for production use. Nevertheless, the language is stable and the compiler implements the full specification. The main things lacking a

                                          • 地面を見下ろす少年の足蹴にされる私

                                            文書の一覧 JTC1/SC22/WG21 - Papers mailing2025-12 全部で113本あります。 もくじ N5011 Brno 2026 N5029 WG21 2025-10 Kona Admin telecon minutes N5031 WG21 2025-11 Kona Minutes of Meeting N5032 Working Draft, Standard for Programming Language C++ N5033 Editors' Report - Programming Languages - C++ P1317R2 Remove return type deduction in std::apply P1789R2 Library Support for Expansion Statements P1789R3 Library Suppor

                                              地面を見下ろす少年の足蹴にされる私
                                            • std::flip

                                              std::flip is a little-known utility from the C++ standard library header <functional>: it is a higher-order function that accepts a Callable and returns an equivalent Callable with the order of its parameters reversed (or “flipped”). To understand how it can be useful, let’s start with a simple example. Consider the following tree node class: struct node { int value; node* parent = nullptr; node*

                                              • Programming languages should have a tree traversal primitive

                                                There should be a control flow construct in programming languages that can handle tree-like traversal in a nice way, similar to how for/foreach loops can handle linear traversal. It's a bit of a missing gap in the current set of control flow constructs most languages these days have settled on. Its a thing I end up having to do *all the time* and it seems like there should be some shortcuts for it

                                                  Programming languages should have a tree traversal primitive
                                                • 8 More C++23 Examples

                                                  In this article, you’ll see eight larger examples that illustrate the changes in C++23. C++23 brings a ton of cool features, as you can see in my two previous articles (here and here). So far, we explored each new addition one by one, but I’d like to share more examples that combine multiple features. Here we go: 1. std::ranges::to<> The ranges::to<> feature allows you to convert ranges into conta

                                                    8 More C++23 Examples
                                                  • C++とOpenSSLでX25519による鍵共有をする | 記事

                                                    2021/09/15 WireGuardというVPNでは通信相手を特定するのにX25519という鍵共有アルゴリズムが使われている。WireGuard用に作成した鍵を自分のプログラムに流用したい。 [WireGuard](https://ja.wikipedia.org/wiki/WireGuard)は 2020年1月に Linuxに標準で取り込まれ、また他にも Windows, Mac, iOS, Androidにそれぞれ無償で提供されている VPN実装で、余計な機能を持たせずに接続性の高さと攻撃平面の小ささを追求した設計になっている。 IPアドレスの自動割当とかそういった「多くの人が欲しいもの」もさしあたり「余計な機能」扱いなので[^1]、WireGuardでVPN接続をせんとする両端点はあらかじめ設定ファイルで静的に設定されている必要がある。したがって、ハブ型のVPNサーバを Wire

                                                      C++とOpenSSLでX25519による鍵共有をする | 記事
                                                    • QMK ファームウェア 2MB の壁を超える - koktoh の雑記帳

                                                      はじめに 先日投稿した、「QMK は 2MB を超えるファームウェアを作れない」という問題が解決できたので、その方法を記していきます。 問題の詳しい内容はこちら。 koktoh.hatenablog.com はじめに 前提 解決法 その1 解決法 その2 必要なファイルの配置 ファイルの編集 配置したリンカスクリプトを参照させる 解決法 その3 (非推奨) 方法によってビルド成果物に違いがないか確認 解決法 その1 のチェックサム 解決法 その2 のチェックサム 比較 Tips ビルドの詳細を表示する ld コマンドの詳細を表示する make コマンドで有効な引数など一覧 おわりに 謝辞 前提 RP2040 をターゲットとしてファームウェアをビルドする場合です。 RP2040 をターゲットとしてビルドするための基本的な設定などは、別途 公式ドキュメント などで確認してください。 解決法 そ

                                                        QMK ファームウェア 2MB の壁を超える - koktoh の雑記帳
                                                      • Emotet vs EmoCheck

                                                        Emotet vs EmoCheck Emotet開発者との戦い NTT 社会情報研究所 谷 知亮 JPCERT/CC インシデントレスポンスグループ 喜野 孝太 JPCERT/CC インシデントレスポンスグループ 佐條 研 $whoami Tomoaki Tani Kota Kino Ken Sajo NTT 社会情報研究所社会理論 研究プロジェクトに所属。主にマ ルウェア分析技術や脆弱性分析 技術の研究を行っている。以前 はJPCERT/CCでマルウェア分 析やインシデント対応に従事して いた。Virus Bulletin, CODEBLUE, BotConf, BsidesLV, BlackHat USA Arsenalなどで講演。 国内ITベンダーでのメールセキュ リティ製品の導入支援業務を経 て、2019年よりJPCERT/CC。 現 在は、標的型攻撃への対応も含 んだ、日本国内

                                                        • Workshop: An Introduction to macOS Forensics with Open Source Software

                                                          Workshop: An Introduction to macOS Forensics with Open Source Software Japan Security Analyst Conference 2022 株式会社インターネットイニシアティブ 小林 稔 Who am I? 小林 稔 2 • 株式会社インターネットイニシアティブ セキュリティ本部 セキュリティ情報統括室 技術調査、社内インシデントレスポンス • 外部活動 セキュリティキャンプ全国大会講師 2017-2019 Japan Security Analyst Conference Speaker 2018/2020 Black Hat USA 2018 Briefing Speaker • Twitter: @unkn0wnbit はじめに 3 0 本ワークショップの目的 (1/2) ◦本ワークショップでやること ▪

                                                          • The downsides of C++ Coroutines

                                                            This blog post aims to shed light on the potential risks associated with transitioning a codebase to incorporate coroutines. Continual misuse of coroutines may result in software vulnerabilities and performance degradation. Coroutines, even in the absence of multi-threading, demand a level of caution comparable to writing multi-threaded code due to their asynchronous nature. Understanding and prop

                                                            • Rust panics under the hood, and implementing them in .NET

                                                              Rust panics under the hood, and implementing them in .NET I am currently working on a Rust to .NET compiler, rustc_codegen_clr. To get it to work, I need to implement many Rust features using .NET APIs. One of such features is panicking and unwinding. This article is the first one in a series about Rust panics, unwinding, and my implementation of them in .NET. In this part, I will look at unwindin

                                                              1