並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 40 件 / 67件

新着順 人気順

std array to vector cの検索結果1 - 40 件 / 67件

  • 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
    • 2023年のコンパイル時レイトレーシング - in neuro

      これは qiita.com の12/16の記事です。やばいもう16日が終わってしまう! はじめに 太古の昔、あるC++プログラマ*1がtemplateの再帰と特殊化を使ってコンパイル時に計算ができることを「発見」*2*3したその日から、C++とコンパイル時計算は分かちがたく結びついています。 言語機能を本来意図されていなかった方法で活用する曲芸的な技巧だったコンパイル時計算は、その強力さを買われコミュニティを席巻し、C++11での constexpr の導入によりある意味で公式に認められたものとなりました。 導入当初は return 文一つだけしか持てなかった constexpr 関数は、それでも三項演算子による条件分岐や再帰によってコンパイル時計算を大いに盛り上げました。 そしてC++14で条件分岐、ループ、変数の書き換えが、C++17ではラムダが、C++20では仮想関数と動的メモリ確保

        2023年のコンパイル時レイトレーシング - in neuro
      • Implementing Hash Tables in C

        NOTE(s): The article is in “draft” status. The content was originally written in 2017. The intended audience for this article is undergrad students or seasoned developers who want to refresh their knowledge on the subject. The reader should already be familiar with C (pointers, pointer functions, macros, memory management) and basic data structures knowledge (e.g., arrays, linked lists, and binary

        • Algorithms for Modern Hardware - Algorithmica

          This is an upcoming high performance computing book titled “Algorithms for Modern Hardware” by Sergey Slotin. Its intended audience is everyone from performance engineers and practical algorithm researchers to undergraduate computer science students who have just finished an advanced algorithms course and want to learn more practical ways to speed up a program than by going from $O(n \log n)$ to $

          • 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
            • Vectorized and performance-portable Quicksort

              The latest news from Google on open source releases, major projects, events, and outreach programs for early career developers. Today we're sharing open source code that can sort arrays of numbers about ten times as fast as the C++ std::sort, and outperforms state of the art architecture-specific algorithms, while being portable across all modern CPU architectures. Below we discuss how we achieved

                Vectorized and performance-portable Quicksort
              • Node.js — Node.js 24.0.0 (Current)

                2025-05-06, Version 24.0.0 (Current), @RafaelGSS and @juanarbol We’re excited to announce the release of Node.js 24! This release brings several significant updates, including the upgrade of the V8 JavaScript engine to version 13.6 and npm to version 11. Starting with Node.js 24, support for MSVC has been removed, and ClangCL is now required to compile Node.js on Windows. The AsyncLocalStorage API

                  Node.js — Node.js 24.0.0 (Current)
                • Wasm core dumps and debugging Rust in Cloudflare Workers

                  Wasm core dumps and debugging Rust in Cloudflare Workers2023-08-14 A clear sign of maturing for any new programming language or environment is how easy and efficient debugging them is. Programming, like any other complex task, involves various challenges and potential pitfalls. Logic errors, off-by-ones, null pointer dereferences, and memory leaks are some examples of things that can make software

                    Wasm core dumps and debugging Rust in Cloudflare Workers
                  • 即興演奏のためのオーディオビジュアルセットを作った

                    2024年の9月14日に岡千穂さん、野本直輝さんらからComputer Music Partyというイベントにお誘いいただき、かなり久し振りにソロでの即興演奏、オーディオビジュアルのライブをしました。出演者全員やってることがみんな違ってて、全員何をしているのか全然わからなくて素晴らしいイベントでした。。 Calum Gunn, moxus, Naoki Nomoto & Utah Kawasaki, Satoru Higa, okachiho - Tokyo Gig Guide 本記事はそのイベントの中で何をしていたか、どう作ったか、についての内容となります 実際の演奏中の様子はこちら モチベーション 大学生のころ、専攻ではコンピューターミュージックを学ぶかたわら放課後はジャズ研でドラムを演奏するといった学生生活を送っていました 卒業して早20年程度が経過した今、久しぶりにドラム触りたいけ

                      即興演奏のためのオーディオビジュアルセットを作った
                    • The life and times of an Abstract Syntax Tree

                      You’ve reached computer programming nirvana. Your journey has led you down many paths, including believing that God wrote the universe in LISP, but now the truth is clear in your mind: every problem can be solved by writing one more compiler. It’s true. Even our soon-to-be artificially intelligent overlords are nothing but compilers, just as the legends foretold. That smart contract you’ve been wr

                        The life and times of an Abstract Syntax Tree
                      • Text Editor Data Structures

                        Text editors can be an interesting challenge to program. The types of problems that text editors need to solve can range from trivial to mind-bogglingly difficult. Recently, I have been on something of a spiritual journey to rework some internal data structures in an editor I have been building, specifically the most fundamental data structure to any text editor: the text. Table of Contents Resour

                          Text Editor Data Structures
                        • Writing a Linux-compatible kernel in Rust

                          Writing a Linux-compatible kernel in RustMay 19, 2021 TL;DR: I'm writing a Linux clone in Rust just for fun. It does NOT aim to replace the Linux kernel. For the recent months, I've been working on a new operating system kernel Kerla, written from scratch in Rust which aims to be Linux-compatible at the ABI level. In other words, support running unmodified Linux binaries! I've already implemented

                            Writing a Linux-compatible kernel in Rust
                          • 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

                            • CUDA C/C++ Basics

                              © NVIDIA Corporation 2011 CUDA C/C++ Basics Supercomputing 2011 Tutorial Cyril Zeller, NVIDIA Corporation © NVIDIA Corporation 2011 What is CUDA?  CUDA Architecture  Expose GPU computing for general purpose  Retain performance  CUDA C/C++  Based on industry-standard C/C++  Small set of extensions to enable heterogeneous programming  Straightforward APIs to manage devices, memory etc.  This

                              • Hard Mode Rust

                                Oct 6, 2022 This post is a case study of writing a Rust application using only minimal, artificially constrained API (eg, no dynamic memory allocation). It assumes a fair bit of familiarity with the language. The back story here is a particular criticism of Rust and C++ from hard-core C programmers. This criticism is aimed at RAII — the language-defining feature of C++, which was wholesale importe

                                • 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

                                    • C++ AMPの死について

                                      C++ AMPの死について C++ AMPが死ぬことが決まった.本稿では,C++ AMPとは何だったのか,直近・今後のC++ AMPの動向,C++ AMPの死,そしてC++ AMPの代替となりうる存在についての検討を,個人の見解として述べる. C++ AMPとは C++ AMP(Accelerated Massive Parallelism)はMicrosoftが策定したデータ並列プログラミングAPIである[1].C++ AMPで記述されたプログラムはCPUのSIMD演算器やGPUといったデータ並列に強い(≒SIMDな)プロセッサにオフロードされ,高速に処理される[2].C++の名を冠する通り,C++ AMPはC++をベースとしてライブラリとコンパイラ拡張で構成されており,CUDA C/C++のようにデータ並列部分とそれ以外のコードを単一ソースに記述することができる.このあたりは実例を見た

                                        C++ AMPの死について
                                      • Building the Rust compiler with GCC

                                        Bootstrapping Rust with GCC If you know one thing about me, it is that I love working on the Rust compiler. Some people kayak, travel or play guitar - and I stare at assembly, trying to figure out what I broke. This summer, I am taking on quite a large task: bootstrapping the Rust compiler using `cg_gcc` What does that mean? "bootstrapping" is simply a name given to the Rust compiler build process

                                        • プログラミング言語の実行速度比較(2023/5)

                                          はじめに 先月、プログラミング言語の実行速度比較(2023/4)という記事を投稿した。 思ったより多くの方に見ていただき、有用なコメントやPull Requestをいただいたので、それらを踏まえ以下の更新を行い結果を再投稿する。 明示的な型をもつ言語では、それぞれ32bit、64bit長型の変数を使った場合についてそれぞれ測定 C言語については前回の結果で固定長配列とrealloc()を使った場合で大きな違いがなかったのでrealloc()版のみエントリ C/C++では、実用上ほぼ使用されない最適化なしをドロップ Go版では、@kaoriyaさんから、数値の型(int)をint32に変えると性能が向上する旨のコメントを頂いた。Go版もint32とint64で測定した Scala版では、@windymeltさんから、GraalVMを使った場合の性能向上について情報を頂いた。JVM上で動作する

                                            プログラミング言語の実行速度比較(2023/5)
                                          • The V8 Sandbox · V8

                                            After almost three years since the initial design document and hundreds of CLs in the meantime, the V8 Sandbox — a lightweight, in-process sandbox for V8 — has now progressed to the point where it is no longer considered an experimental security feature. Starting today, the V8 Sandbox is included in Chrome's Vulnerability Reward Program (VRP). While there are still a number of issues to resolve be

                                            • Async/Await | Writing an OS in Rust

                                              この記事は翻訳されたものです: この記事はAsync/Awaitをコミュニティの手により翻訳したものです。そのため、翻訳が完全・最新でなかったり、原文にない誤りを含んでいる可能性があります。問題があればこのissue上で報告してください! 翻訳者: @kahirokunn, @garasubo, @sozysozbot 及び @swnakamura. With contributions from @asami-kawasaki 及び @Foo-x. この記事では、Rustの協調的マルチタスクとasync/await機能について説明します。Rustのasync/await機能については、Future trait の設計、ステートマシンの変換、 pinning などを含めて詳しく説明します。そして、非同期キーボードタスクと基本的なexecutorを作成することで、カーネルにasync/awa

                                              • V Language Review (2022)

                                                V is a programming language promising to be “Simple, fast, safe, compiled. For developing maintainable software.” V has a controversial past but what is the state of V in 2022? Is V worth checking out? In this post, we’ll take a look at V as it exists in May 2022. TLDR Read the summary Rules of engagement I’ll be using the current version of V built from git which is 50ab2cfd1ae02d4f4280f38c60b8db

                                                • Trivia About Rust Types: An (Authorized) Transcription of Jon Gjengset's Twitter Thread

                                                  Preface (by Jimmy Hartzell) I am a huge fan of Jon Gjengset’s Rust for Rustaceans, an excellent book to bridge the gap between beginner Rust programming skills and becoming a fully-functional member of the Rust community. He’s famous for his YouTube channel as well; I’ve heard good things about it (watching video instruction isn’t really my thing personally). I have also greatly enjoyed his Twitte

                                                  • 21st Century C++ – Communications of the ACM

                                                    It is now 45+ years since C++ was first conceived. As planned, it evolved to meet challenges, but many developers use C++ as if it was still the previous millennium. This is suboptimal from the perspective of ease of expressing ideas, performance, reliability, and maintainability. Here, I present the key concepts on which performant, type safe, and flexible C++ software can be built: resource mana

                                                    • C++ creator calls for action to address 'serious attacks'

                                                      Bjarne Stroustrup wants standards body to respond to memory-safety push as Rust monsters lurk at the door Bjarne Stroustrup, creator of C++, has issued a call for the C++ community to defend the programming language, which has been shunned by cybersecurity agencies and technical experts in recent years for its memory safety shortcomings. C and C++ are built around manual memory management, which c

                                                        C++ creator calls for action to address 'serious attacks'
                                                      • lower_bound で混乱している人かわいそう - えびちゃんの日記

                                                        言語さんサイドにも問題があるというのはそうかも。 とはいえ、理解が足りないまま「わかりにくい」と言っている人はかわいそうなので、解説をします。 名前について なんで「x 以上の最小値を得る関数」が lower_bound と呼ばれているのかわからん*1 まず、それを得る関数ではないです。イディオムとしてそう覚えてしまっているような人が多いため、こうなってしまう人が多い気はします。 実際には値ではなくイテレータを返すもので、「x と等価 (equivalent) な値がある区間の下限の位置」が返ってきます。ここでの equivalent というのは == とは違う概念なのですが、とりあえず(int のような型では)== と同一視してよいので、詳細は後述とします。 また、upper_bound についても同様で、「x より大きい最小値を得る関数」ではなく、「x と等価な値がある区間の上限の位置

                                                          lower_bound で混乱している人かわいそう - えびちゃんの日記
                                                        • [C++]WG21月次提案文書を眺める(2022年05月) - 地面を見下ろす少年の足蹴にされる私

                                                          文書の一覧 JTC1/SC22/WG21 - Papers 2022 mailing2022-05 全部で36本あります。 N4912 2022-11 Kona hybrid meeting information N4913 PL22.16/WG21 agenda: 25 July 2022, Virtual Meeting P0543R1 Saturation arithmetic P0792R9 function_ref: a non-owning reference to a Callable P0901R9 Size feedback in operator new P1021R6 Filling holes in Class Template Argument Deduction P1255R7 A view of 0 or 1 elements: views::maybe P

                                                            [C++]WG21月次提案文書を眺める(2022年05月) - 地面を見下ろす少年の足蹴にされる私
                                                          • https://cheats.rs/rust_cheat_sheet.pdf

                                                            Rust Language Cheat Sheet 26. August 2021 Contains clickable links to The Book , Rust by Example , Std Docs , Nomicon , Reference . Data Structures Data types and memory locations defined via keywords. Example Explanation struct S {} Define a struct with named fields. struct S { x: T } Define struct with named field x of type T. struct S ​(T); Define "tupled" struct with numbered field .0 of type

                                                            • bytecode interpreters for tiny computers ⁑ Dercuano

                                                              Introduction: Density Is King (With a Tiny VM) I've previously come to the conclusion that there's little reason for using bytecode in the modern world, except in order to get more compact code, for which it can be very effective. So, what kind of a bytecode engine will give you more compact code? Suppose I want a bytecode interpreter for a very small programming environment, specifically to minim

                                                              • 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

                                                                • I made JSON.parse() 2x faster

                                                                  Part of my job is to make JavaScript things go fast. Speed is a feature, and when working in an interpreted language, squeezing every last bit of performance can be the difference between a great product and unusable garbage. Anyway, how cool would it be to make JavaScript itself go faster? I’m not a C++ programmer, but that didn’t stop me before, so I thought I’d give it a try anyway! The objecti

                                                                    I made JSON.parse() 2x faster
                                                                  • The Alkyne GC · mcyoung

                                                                    Alkyne is a scripting language I built a couple of years ago for generating configuration blobs. Its interpreter is a naive AST walker1 that uses ARC2 for memory management, so it’s pretty slow, and I’ve been gradually writing a new evaluation engine for it. This post isn’t about Alkyne itself, that’s for another day. For now, I’d like to write down some notes for the GC I wrote3 for it, and more

                                                                      The Alkyne GC · mcyoung
                                                                    • 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

                                                                      • 世界一やさしいHLAC入門!(間違い探し編) - アダコテック技術ブログ

                                                                        はじめまして! 2021年4月からAdacotechでエンジニアとして入社しました井上耕太朗です。 それまでは大学にて光学や3次元画像処理、機械学習といった分野の研究に携わっていました。 経歴について詳しくは下記noteの記事にて! note.com 技術系の情報はこちらの技術ブログにまとめます。 今回はAdacotechのコア技術であるHLAC(高次局所自己相関)をPythonで実装しながら、サンプル問題として間違い探しを解き、HLACの仕組みについて解説しようと思います。 HLAC: Higher-order Local Auto-Correlation そもそも相関って? 相関の適切な使い方 自己相関と認識 おやおや!それはHLACではありませんか!! 二値HLACを実装してみよう! 位置不変性の確認 加法性の確認 HLACで間違い探し まとめ: HLACとは何だったのか HLAC:

                                                                          世界一やさしいHLAC入門!(間違い探し編) - アダコテック技術ブログ
                                                                        • Why Today’s Python Developers Are Embracing Type Hints | Pyrefly

                                                                          Python is one of the most successful programming languages out there, with it recently overtaking Javascript as the most popular language on GitHub, according to the latest GitHub Octoverse report. The report emphasises the popularity of the language in the growing fields of AI, data science and scientific computing - fields where speedy experimentation and iteration are critical, and where develo

                                                                            Why Today’s Python Developers Are Embracing Type Hints | Pyrefly
                                                                          • Zig 言語リファレンス

                                                                            index.md これは Zig ドキュメント 0.10.1 を DeepL Pro と ChatGPT を利用して翻訳したものです。 一部 master なモノもあります、ごちゃ混ぜです 自分用に翻訳しています zig_doc_0.10.1.md Zig 言語リファレンス はじめに Zig は、堅牢で最適かつ再利用可能なソフトウェアを維持するための汎用プログラミング言語およびツールチェインです。 ロバスト メモリ不足などのエッジケースでも正しく動作する。 最適化 プログラムが最適に動作・実行されるように記述する。 再利用可能 同じコードが、制約の異なる多くの環境で動作します。 保守性 コンパイラや他のプログラマに意図を正確に伝えることができる。コードを読むためのオーバーヘッドが少なく、要件や環境の変化に強い言語です。 新しいことを学ぶのに一番効率的な方法は例を見ることであることが多いので

                                                                              Zig 言語リファレンス
                                                                            • RWKV-World-V2をPythonから日本語で操作する|shi3z

                                                                              RKWV-World-V2の出来があまりにも良いのでPythonで使う方法をメモっておきます。 基本的にこのGradioの内容をいつものLLMベンチマークの形式にしただけ import os, gc, copy, torch from datetime import datetime from huggingface_hub import hf_hub_download from pynvml import * ctx_limit = 2000 title = "RWKV-5-World-1B5-v2-20231025-ctx4096" os.environ["RWKV_JIT_ON"] = '1' os.environ["RWKV_CUDA_ON"] = '1' # if '1' then use CUDA kernel for seq mode (much faster) from r

                                                                                RWKV-World-V2をPythonから日本語で操作する|shi3z
                                                                              • 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
                                                                                • How I learned Vulkan and wrote a small game engine with it

                                                                                  Comments (GitHub discussion) Comments (Hacker News) tl;dr: I learned some Vulkan and made a game engine with two small game demos in 3 months. The code for the engine and the games can be found here: https://github.com/eliasdaler/edbr This article documents my experience of learning Vulkan and writing a small game/engine with it. It took me around 3 months to do it without any previous knowledge o