# Graham King

Recent content on Graham King

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Evaluating LLMs for my personal use case

DevFeed: [Evaluating LLMs for my personal use case](<https://devfeed.tech/articles/evaluating-llms-for-my-personal-use-case-35441.md>)

Original publisher: [Read original article](<https://darkcoding.net/software/personal-ai-evals-aug-2025/>)

Author: Graham King

Published: 2025-08-23T17:00:00Z

Content type: opinion

Language: en

Sources: [Graham King](<https://devfeed.tech/sources/graham-king.md>)

Topics: [Large Language Model](<https://devfeed.tech/topics/llm.md>), [Programming](<https://devfeed.tech/topics/programming.md>), [Inference Performance](<https://devfeed.tech/topics/inference-performance.md>), [Rust](<https://devfeed.tech/topics/rust.md>), [Command-line interface](<https://devfeed.tech/topics/cli.md>), [Linux](<https://devfeed.tech/topics/linux.md>), [Python](<https://devfeed.tech/topics/python.md>)

Tags: [ai](<https://devfeed.tech/tags/ai.md>), [coding](<https://devfeed.tech/tags/coding.md>), [devstral](<https://devfeed.tech/tags/devstral.md>), [evals](<https://devfeed.tech/tags/evals.md>), [latency](<https://devfeed.tech/tags/latency.md>), [linux](<https://devfeed.tech/tags/linux.md>), [llms](<https://devfeed.tech/tags/llms.md>), [programming](<https://devfeed.tech/tags/programming.md>), [python](<https://devfeed.tech/tags/python.md>), [qwen](<https://devfeed.tech/tags/qwen.md>), [qwen3](<https://devfeed.tech/tags/qwen3.md>), [software](<https://devfeed.tech/tags/software.md>)

### AI overview

The author evaluates a set of language models against 130 real prompts drawn from personal bash history, covering programming, system administration, technical explanations, general knowledge, and creative tasks. The evaluation uses blinded Rust scripts and records cost, latency, and throughput, with models selected based on prior experience, leaderboards, and price.

### Source excerpt

My life is not a math Olympiad

## Underrust: What is the cost of Mutex, RwLock and AtomicPtr?

DevFeed: [Underrust: What is the cost of Mutex, RwLock and AtomicPtr?](<https://devfeed.tech/articles/underrust-what-is-the-cost-of-mutex-rwlock-and-atomicptr-35479.md>)

Original publisher: [Read original article](<https://darkcoding.net/software/underrust-mutual-exclusion/>)

Author: Graham King

Published: 2025-05-05T20:05:00Z

Content type: tutorial

Language: en

Sources: [Graham King](<https://devfeed.tech/sources/graham-king.md>)

Topics: [Rust](<https://devfeed.tech/topics/rust.md>), [Concurrent Programming](<https://devfeed.tech/topics/concurrent-programming.md>), [x86](<https://devfeed.tech/topics/x86.md>), [cpu](<https://devfeed.tech/topics/cpu.md>), [Assembly](<https://devfeed.tech/topics/assembly.md>)

Tags: [assembly](<https://devfeed.tech/tags/assembly.md>), [concurrent](<https://devfeed.tech/tags/concurrent.md>), [cpu](<https://devfeed.tech/tags/cpu.md>), [cycles](<https://devfeed.tech/tags/cycles.md>), [locking](<https://devfeed.tech/tags/locking.md>), [performance](<https://devfeed.tech/tags/performance.md>), [rust](<https://devfeed.tech/tags/rust.md>), [software](<https://devfeed.tech/tags/software.md>), [synchronization](<https://devfeed.tech/tags/synchronization.md>), [underrust](<https://devfeed.tech/tags/underrust.md>)

### AI overview

A Rust-focused analysis uses assembly output to examine the cost of Mutex, RwLock, and atomic operations for many concurrent readers and an occasional writer. It scopes the discussion to Linux and x86, noting that the fast-path operations discussed are roughly in the range of 20 to 30 CPU cycles.

### Source excerpt

With many concurrent readers and a single occasional writer, which mutual exclusion primitive should you use? Let's look at the assembly to find out.

## Underrust: How does u128 work on a 64-bit processor?

DevFeed: [Underrust: How does u128 work on a 64-bit processor?](<https://devfeed.tech/articles/underrust-how-does-u128-work-on-a-64-bit-processor-35481.md>)

Original publisher: [Read original article](<https://darkcoding.net/software/underrust-u128/>)

Author: Graham King

Published: 2025-04-05T20:45:00Z

Content type: tutorial

Language: en

Sources: [Graham King](<https://devfeed.tech/sources/graham-king.md>)

Topics: [cpu](<https://devfeed.tech/topics/cpu.md>), [x86](<https://devfeed.tech/topics/x86.md>), [Rust](<https://devfeed.tech/topics/rust.md>), [Compiler](<https://devfeed.tech/topics/compiler.md>), [Assembly](<https://devfeed.tech/topics/assembly.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [assembly](<https://devfeed.tech/tags/assembly.md>), [code](<https://devfeed.tech/tags/code.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [processors](<https://devfeed.tech/tags/processors.md>), [rust](<https://devfeed.tech/tags/rust.md>), [simd](<https://devfeed.tech/tags/simd.md>), [software](<https://devfeed.tech/tags/software.md>), [sse](<https://devfeed.tech/tags/sse.md>), [underrust](<https://devfeed.tech/tags/underrust.md>), [x86](<https://devfeed.tech/tags/x86.md>)

### AI overview

The article explains how Rust u128 values work on x86-64 processors whose general-purpose registers are limited to 64 bits. It describes splitting values across two registers and distinguishes this from the use of 128-bit SSE registers for SIMD operations.

### Source excerpt

Wherein our hero learns the arcane secrets of the u128 sword in the depths of the Underrust.

## Rust HashMap notes

DevFeed: [Rust HashMap notes](<https://devfeed.tech/articles/rust-hashmap-notes-35458.md>)

Original publisher: [Read original article](<https://darkcoding.net/software/rust-hashmap-notes/>)

Author: Graham King

Published: 2025-03-30T14:50:00Z

Content type: article

Language: en

Sources: [Graham King](<https://devfeed.tech/sources/graham-king.md>)

Topics: [Rust](<https://devfeed.tech/topics/rust.md>), [implementation](<https://devfeed.tech/topics/implementation.md>), [Data structures](<https://devfeed.tech/topics/data-structures.md>)

Tags: [array](<https://devfeed.tech/tags/array.md>), [bits](<https://devfeed.tech/tags/bits.md>), [cache](<https://devfeed.tech/tags/cache.md>), [code](<https://devfeed.tech/tags/code.md>), [datastructures](<https://devfeed.tech/tags/datastructures.md>), [hash](<https://devfeed.tech/tags/hash.md>), [hashmap](<https://devfeed.tech/tags/hashmap.md>), [implementation](<https://devfeed.tech/tags/implementation.md>), [optimization](<https://devfeed.tech/tags/optimization.md>), [rust](<https://devfeed.tech/tags/rust.md>), [software](<https://devfeed.tech/tags/software.md>)

### AI overview

Raw research notes explaining the design and implementation of Rust's HashMap. The article describes its SwissTable-based probing layout, contiguous storage, control bytes, SIMD comparisons, hash decomposition, lookup process, and growth behavior.

### Source excerpt

Raw notes on Rust's HashMap design and implementation

## CPU Performance Optimization notes

DevFeed: [CPU Performance Optimization notes](<https://devfeed.tech/articles/cpu-performance-optimization-notes-35385.md>)

Original publisher: [Read original article](<https://darkcoding.net/software/cpu-optimization-notes/>)

Author: Graham King

Published: 2025-03-29T16:15:00Z

Content type: tutorial

Language: en

Sources: [Graham King](<https://devfeed.tech/sources/graham-king.md>)

Topics: [cpu](<https://devfeed.tech/topics/cpu.md>), [Optimization](<https://devfeed.tech/topics/optimization.md>), [performance-optimization](<https://devfeed.tech/topics/performance-optimization.md>), [Cache](<https://devfeed.tech/topics/cache.md>), [Code](<https://devfeed.tech/topics/code.md>), [data](<https://devfeed.tech/topics/data.md>), [floating-point](<https://devfeed.tech/topics/floating-point.md>)

Tags: [array](<https://devfeed.tech/tags/array.md>), [arrays](<https://devfeed.tech/tags/arrays.md>), [cache](<https://devfeed.tech/tags/cache.md>), [code](<https://devfeed.tech/tags/code.md>), [cpu](<https://devfeed.tech/tags/cpu.md>), [cpu-optimization](<https://devfeed.tech/tags/cpu-optimization.md>), [data](<https://devfeed.tech/tags/data.md>), [floating-point](<https://devfeed.tech/tags/floating-point.md>), [hardware](<https://devfeed.tech/tags/hardware.md>), [loops](<https://devfeed.tech/tags/loops.md>), [memory](<https://devfeed.tech/tags/memory.md>), [optimization](<https://devfeed.tech/tags/optimization.md>), [performance](<https://devfeed.tech/tags/performance.md>), [performance-optimization](<https://devfeed.tech/tags/performance-optimization.md>), [software](<https://devfeed.tech/tags/software.md>)

### AI overview

Raw notes on CPU performance optimization covering data locality, cache behavior, memory alignment, data layout, prefetching, integer and floating-point types, powers of two, vectorization, and predictable branching.

### Source excerpt

Raw notes on CPU optimization

## Transparent Software

DevFeed: [Transparent Software](<https://devfeed.tech/articles/transparent-software-35476.md>)

Original publisher: [Read original article](<https://darkcoding.net/software/transparent-software/>)

Author: Graham King

Published: 2025-03-29T15:54:00Z

Content type: opinion

Language: en

Sources: [Graham King](<https://devfeed.tech/sources/graham-king.md>)

Topics: [Software](<https://devfeed.tech/topics/software.md>), [Hugo](<https://devfeed.tech/topics/hugo.md>), [passwords](<https://devfeed.tech/topics/passwords.md>), [Neovim](<https://devfeed.tech/topics/neovim.md>), [HTTP](<https://devfeed.tech/topics/http.md>)

Tags: [design](<https://devfeed.tech/tags/design.md>), [http](<https://devfeed.tech/tags/http.md>), [hugo](<https://devfeed.tech/tags/hugo.md>), [markdown](<https://devfeed.tech/tags/markdown.md>), [password](<https://devfeed.tech/tags/password.md>), [passwords](<https://devfeed.tech/tags/passwords.md>), [plugin](<https://devfeed.tech/tags/plugin.md>), [python](<https://devfeed.tech/tags/python.md>), [rust](<https://devfeed.tech/tags/rust.md>), [software](<https://devfeed.tech/tags/software.md>), [trust](<https://devfeed.tech/tags/trust.md>)

### AI overview

The article defines transparent software as software whose behavior and structure users can understand and replace. It contrasts Hugo with WordPress, and describes the author's password manager, kip, as a modular tool built around user-controlled encrypted files and configurable command-line utilities.

### Source excerpt

A software system is transparent when you can look at it and immediately understand what it is doing and how.

## Travels with ChatGPT

DevFeed: [Travels with ChatGPT](<https://devfeed.tech/articles/travels-with-chatgpt-35362.md>)

Original publisher: [Read original article](<https://darkcoding.net/society/travels-with-chatgpt/>)

Author: Graham King

Published: 2024-07-07T20:24:00Z

Content type: opinion

Language: en

Sources: [Graham King](<https://devfeed.tech/sources/graham-king.md>)

Topics: [ChatGPT](<https://devfeed.tech/topics/chatgpt.md>), [Language models](<https://devfeed.tech/topics/language-models.md>), [Android](<https://devfeed.tech/topics/android.md>), [API](<https://devfeed.tech/topics/api.md>)

Tags: [ai](<https://devfeed.tech/tags/ai.md>), [android](<https://devfeed.tech/tags/android.md>), [chatgpt](<https://devfeed.tech/tags/chatgpt.md>), [gpt](<https://devfeed.tech/tags/gpt.md>), [llm](<https://devfeed.tech/tags/llm.md>), [plan](<https://devfeed.tech/tags/plan.md>), [society](<https://devfeed.tech/tags/society.md>), [summary](<https://devfeed.tech/tags/summary.md>), [vision](<https://devfeed.tech/tags/vision.md>)

### AI overview

The author describes using GPT-4o in the ChatGPT Android app during a holiday to translate menus, identify historical artifacts and artwork, understand wine and hieroglyphics, plan an itinerary, and summarize books. They argue that ChatGPT's vision capabilities made obtaining contextual information more convenient than searching while traveling, while also noting that it failed to translate Egyptian hieroglyphics.

### Source excerpt

An overconfident genius personal assistant in my pocket

## AI Hallucinations Are Often Reasonable Suggestions

DevFeed: [AI Hallucinations Are Often Reasonable Suggestions](<https://devfeed.tech/articles/ai-hallucinations-are-often-reasonable-suggestions-35372.md>)

Original publisher: [Read original article](<https://darkcoding.net/software/ai-hallucinations-are-often-reasonable-suggestions/>)

Author: Graham King

Published: 2024-05-26T19:00:00Z

Content type: opinion

Language: en

Sources: [Graham King](<https://devfeed.tech/sources/graham-king.md>)

Topics: [Artificial Intelligence](<https://devfeed.tech/topics/ai.md>), [Large Language Model](<https://devfeed.tech/topics/llm.md>)

Tags: [ai](<https://devfeed.tech/tags/ai.md>), [ai-hallucination](<https://devfeed.tech/tags/ai-hallucination.md>), [hallucinations](<https://devfeed.tech/tags/hallucinations.md>), [llms](<https://devfeed.tech/tags/llms.md>), [society](<https://devfeed.tech/tags/society.md>), [software](<https://devfeed.tech/tags/software.md>), [training-data](<https://devfeed.tech/tags/training-data.md>)

### AI overview

The article argues that AI hallucinations are often plausible suggestions produced when language models fill gaps in incomplete or ambiguous input. Using Air Canada's bereavement-fare chatbot incident and the Age of the Captain problem, it suggests these responses should be taken seriously as ideas that may reveal how policies or assumptions could change.

### Source excerpt

Don't dismiss the statistically probable

## Underrust: What does vec!\[0u8; 1024\] really do?

DevFeed: [Underrust: What does vec!\[0u8; 1024\] really do?](<https://devfeed.tech/articles/underrust-what-does-vec-0u8-1024-really-do-35464.md>)

Original publisher: [Read original article](<https://darkcoding.net/software/rust-zeroed-vector-allocation/>)

Author: Graham King

Published: 2024-03-29T15:00:00Z

Content type: article

Language: en

Sources: [Graham King](<https://devfeed.tech/sources/graham-king.md>)

Topics: [Rust](<https://devfeed.tech/topics/rust.md>), [Linux](<https://devfeed.tech/topics/linux.md>), [cpu](<https://devfeed.tech/topics/cpu.md>)

Tags: [code](<https://devfeed.tech/tags/code.md>), [cpu](<https://devfeed.tech/tags/cpu.md>), [glibc](<https://devfeed.tech/tags/glibc.md>), [linux](<https://devfeed.tech/tags/linux.md>), [memory](<https://devfeed.tech/tags/memory.md>), [rust](<https://devfeed.tech/tags/rust.md>), [software](<https://devfeed.tech/tags/software.md>), [underrust](<https://devfeed.tech/tags/underrust.md>), [x86](<https://devfeed.tech/tags/x86.md>)

### AI overview

This article traces how Rust creates a zero-initialized vector, following the allocation path through Rust's allocator, the platform abstraction layer, libc's calloc, and the Linux kernel. It examines allocation behavior and cost, with examples focused on 64-bit Linux, glibc, and an Intel Tiger Lake CPU.

### Source excerpt

How does Rust allocate a zeroed Vec and what does it cost?

## The memory remains: Permanent memory with systemd and a Rust allocator

DevFeed: [The memory remains: Permanent memory with systemd and a Rust allocator](<https://devfeed.tech/articles/the-memory-remains-permanent-memory-with-systemd-and-a-rust-allocator-35462.md>)

Original publisher: [Read original article](<https://darkcoding.net/software/rust-systemd-memory-remains/>)

Author: Graham King

Published: 2024-01-10T01:54:00Z

Content type: tutorial

Language: en

Sources: [Graham King](<https://devfeed.tech/sources/graham-king.md>)

Topics: [Rust](<https://devfeed.tech/topics/rust.md>), [systemd](<https://devfeed.tech/topics/systemd.md>), [file](<https://devfeed.tech/topics/file.md>), [Linux](<https://devfeed.tech/topics/linux.md>)

Tags: [assembly](<https://devfeed.tech/tags/assembly.md>), [file](<https://devfeed.tech/tags/file.md>), [function](<https://devfeed.tech/tags/function.md>), [glibc](<https://devfeed.tech/tags/glibc.md>), [layout](<https://devfeed.tech/tags/layout.md>), [memory](<https://devfeed.tech/tags/memory.md>), [mmap](<https://devfeed.tech/tags/mmap.md>), [pointers](<https://devfeed.tech/tags/pointers.md>), [rust](<https://devfeed.tech/tags/rust.md>), [software](<https://devfeed.tech/tags/software.md>), [systemd](<https://devfeed.tech/tags/systemd.md>)

### AI overview

This tutorial explains how to make Rust objects survive program restarts by combining Rust's Allocator trait with systemd's File Descriptor Store and Linux's memfd_create syscall. The approach stores allocator-backed memory in an in-memory file, maps it with mmap, and restores it after restart.

### Source excerpt

A Rust object that survives program restart thanks to Rust allocators, systemd's file descriptor store, and syscall memfd_create.

## What Can You Monitor with epoll on Linux?

DevFeed: [What Can You Monitor with epoll on Linux?](<https://devfeed.tech/articles/linux-what-can-you-epoll-35432.md>)

Original publisher: [Read original article](<https://darkcoding.net/software/linux-what-can-you-epoll/>)

Author: Graham King

Published: 2022-10-20T07:00:00Z

Content type: tutorial

Language: en

Sources: [Graham King](<https://devfeed.tech/sources/graham-king.md>)

Topics: [Linux](<https://devfeed.tech/topics/linux.md>), [Network](<https://devfeed.tech/topics/network.md>), [async](<https://devfeed.tech/topics/async.md>), [Filesystems](<https://devfeed.tech/topics/filesystems.md>), [Processes](<https://devfeed.tech/topics/processes.md>), [Streams](<https://devfeed.tech/topics/streams.md>)

Tags: [async](<https://devfeed.tech/tags/async.md>), [configuration](<https://devfeed.tech/tags/configuration.md>), [epoll](<https://devfeed.tech/tags/epoll.md>), [file](<https://devfeed.tech/tags/file.md>), [go](<https://devfeed.tech/tags/go.md>), [linux](<https://devfeed.tech/tags/linux.md>), [logging](<https://devfeed.tech/tags/logging.md>), [network](<https://devfeed.tech/tags/network.md>), [notifications](<https://devfeed.tech/tags/notifications.md>), [process](<https://devfeed.tech/tags/process.md>), [rust](<https://devfeed.tech/tags/rust.md>), [software](<https://devfeed.tech/tags/software.md>), [tcp](<https://devfeed.tech/tags/tcp.md>), [tokio](<https://devfeed.tech/tags/tokio.md>), [udp](<https://devfeed.tech/tags/udp.md>), [unix](<https://devfeed.tech/tags/unix.md>)

### AI overview

This article surveys Linux file descriptors that can be monitored with epoll, including network sockets, timers, signals, filesystem events, child processes, terminals, page faults, and seccomp notifications. It explains how these sources can be integrated into an epoll event loop or an asynchronous engine such as Go or Rust's tokio.

### Source excerpt

On Linux what can you turn into a file descriptor and then monitor with epoll?

## Underrust: Multiple Return Values

DevFeed: [Underrust: Multiple Return Values](<https://devfeed.tech/articles/underrust-multiple-return-values-35460.md>)

Original publisher: [Read original article](<https://darkcoding.net/software/rust-multiple-return-types/>)

Author: Graham King

Published: 2022-10-18T07:00:00Z

Content type: tutorial

Language: en

Sources: [Graham King](<https://devfeed.tech/sources/graham-king.md>)

Topics: [Rust](<https://devfeed.tech/topics/rust.md>), [Assembly](<https://devfeed.tech/topics/assembly.md>), [LLVM](<https://devfeed.tech/topics/llvm.md>), [Optimization](<https://devfeed.tech/topics/optimization.md>)

Tags: [assembly](<https://devfeed.tech/tags/assembly.md>), [avx](<https://devfeed.tech/tags/avx.md>), [llvm](<https://devfeed.tech/tags/llvm.md>), [optimization](<https://devfeed.tech/tags/optimization.md>), [rust](<https://devfeed.tech/tags/rust.md>), [simd](<https://devfeed.tech/tags/simd.md>), [software](<https://devfeed.tech/tags/software.md>), [underrust](<https://devfeed.tech/tags/underrust.md>)

### AI overview

This article examines how Rust returns values at the ABI and assembly levels. It covers integer and floating-point returns, multiple values, structs, function pointers, caller-stack returns, return-value optimization, and an LLVM SIMD optimization using AVX registers.

### Source excerpt

How does Rust return values, and does it make any difference to us programmers?

## Overthinking Leetcode's Two Sum with SIMD

DevFeed: [Overthinking Leetcode's Two Sum with SIMD](<https://devfeed.tech/articles/overthinking-leetcode-s-two-sum-with-simd-35478.md>)

Original publisher: [Read original article](<https://darkcoding.net/software/two-sum/>)

Author: Graham King

Published: 2022-10-09T07:00:00Z

Content type: tutorial

Language: en

Sources: [Graham King](<https://devfeed.tech/sources/graham-king.md>)

Topics: [Algorithms](<https://devfeed.tech/topics/algorithms.md>), [Code](<https://devfeed.tech/topics/code.md>), [Rust](<https://devfeed.tech/topics/rust.md>)

Tags: [algorithm](<https://devfeed.tech/tags/algorithm.md>), [algorithms](<https://devfeed.tech/tags/algorithms.md>), [array](<https://devfeed.tech/tags/array.md>), [avx](<https://devfeed.tech/tags/avx.md>), [benchmarks](<https://devfeed.tech/tags/benchmarks.md>), [code](<https://devfeed.tech/tags/code.md>), [complexity](<https://devfeed.tech/tags/complexity.md>), [interview](<https://devfeed.tech/tags/interview.md>), [performance](<https://devfeed.tech/tags/performance.md>), [rust](<https://devfeed.tech/tags/rust.md>), [simd](<https://devfeed.tech/tags/simd.md>), [software](<https://devfeed.tech/tags/software.md>)

### AI overview

This article examines the Two Sum problem by comparing a brute-force linear scan with a map-based solution. It discusses their complexity, implementation costs, and when the linear approach may be faster, including the possibility of using AVX-512 instructions.

### Source excerpt

When is the linear scan Two Sum solution faster than a map? What if we use AVX-512 instructions?

## Underrust: What is the cost of sync::Once?

DevFeed: [Underrust: What is the cost of sync::Once?](<https://devfeed.tech/articles/underrust-what-is-the-cost-of-sync-once-35384.md>)

Original publisher: [Read original article](<https://darkcoding.net/software/cost-of-sync-once/>)

Author: Graham King

Published: 2022-09-18T07:00:00Z

Content type: article

Language: en

Sources: [Graham King](<https://devfeed.tech/sources/graham-king.md>)

Topics: [Rust](<https://devfeed.tech/topics/rust.md>), [Concurrency](<https://devfeed.tech/topics/concurrency.md>), [Assembly](<https://devfeed.tech/topics/assembly.md>), [Latency](<https://devfeed.tech/topics/latency.md>)

Tags: [assembly](<https://devfeed.tech/tags/assembly.md>), [cpu](<https://devfeed.tech/tags/cpu.md>), [llvm](<https://devfeed.tech/tags/llvm.md>), [performance](<https://devfeed.tech/tags/performance.md>), [rust](<https://devfeed.tech/tags/rust.md>), [software](<https://devfeed.tech/tags/software.md>), [underrust](<https://devfeed.tech/tags/underrust.md>)

### AI overview

This article analyzes the cost of calling Rust's std::sync::Once after initialization. It explains that repeated calls usually take a fast path, with the function call commonly inlined, a branch that is normally predicted correctly, and a small number of machine instructions whose latency is estimated for an Intel Tiger Lake CPU.

### Source excerpt

In Rust, what is the performance cost of using sync::Once after the initial setup?

## Underrust: Does it matter what type (u8, u32, ...) I use?

DevFeed: [Underrust: Does it matter what type (u8, u32, ...) I use?](<https://devfeed.tech/articles/underrust-does-it-matter-what-type-u8-u32-i-use-35390.md>)

Original publisher: [Read original article](<https://darkcoding.net/software/does-it-matter-what-type-i-use/>)

Author: Graham King

Published: 2022-09-02T07:00:00Z

Content type: tutorial

Language: en

Sources: [Graham King](<https://devfeed.tech/sources/graham-king.md>)

Topics: [Rust](<https://devfeed.tech/topics/rust.md>), [cpu](<https://devfeed.tech/topics/cpu.md>), [Compiler](<https://devfeed.tech/topics/compiler.md>)

Tags: [assembly](<https://devfeed.tech/tags/assembly.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [memory](<https://devfeed.tech/tags/memory.md>), [performance](<https://devfeed.tech/tags/performance.md>), [rust](<https://devfeed.tech/tags/rust.md>), [software](<https://devfeed.tech/tags/software.md>), [underrust](<https://devfeed.tech/tags/underrust.md>)

### AI overview

This Rust article examines how primitive type choices affect memory usage, cache-line capacity, stack space, and potentially performance. It also explains that signed and unsigned integer types generate identical CPU assembly in the demonstrated cases.

### Source excerpt

In Rust, how does using a different primitive type (u8, i32, u64, ...) change the generated assembly?

## The Underrust: Rust's assembly output

DevFeed: [The Underrust: Rust's assembly output](<https://devfeed.tech/articles/the-underrust-rust-s-assembly-output-35480.md>)

Original publisher: [Read original article](<https://darkcoding.net/software/underrust-rust-assembly-output/>)

Author: Graham King

Published: 2022-08-31T07:00:00Z

Content type: tutorial

Language: en

Sources: [Graham King](<https://devfeed.tech/sources/graham-king.md>)

Topics: [Rust](<https://devfeed.tech/topics/rust.md>), [Assembly](<https://devfeed.tech/topics/assembly.md>), [Compiler](<https://devfeed.tech/topics/compiler.md>), [LLVM](<https://devfeed.tech/topics/llvm.md>), [cpu](<https://devfeed.tech/topics/cpu.md>), [Linux](<https://devfeed.tech/topics/linux.md>), [linker](<https://devfeed.tech/topics/linker.md>)

Tags: [assembly](<https://devfeed.tech/tags/assembly.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [cpu](<https://devfeed.tech/tags/cpu.md>), [linker](<https://devfeed.tech/tags/linker.md>), [linux](<https://devfeed.tech/tags/linux.md>), [llvm](<https://devfeed.tech/tags/llvm.md>), [optimize](<https://devfeed.tech/tags/optimize.md>), [performance](<https://devfeed.tech/tags/performance.md>), [rust](<https://devfeed.tech/tags/rust.md>), [software](<https://devfeed.tech/tags/software.md>), [underrust](<https://devfeed.tech/tags/underrust.md>)

### AI overview

This article introduces the Underrust series, which examines Rust programs through their generated assembly. It explains a repeatable setup using Rust on Linux with an Intel processor, a stripped-down program, LLVM optimizations, a custom entry point, and release builds to make assembly easier to inspect.

### Source excerpt

Assembly: In all the world of the programmer, there is no more important output.

## A very small Rust binary indeed

DevFeed: [A very small Rust binary indeed](<https://devfeed.tech/articles/a-very-small-rust-binary-indeed-35370.md>)

Original publisher: [Read original article](<https://darkcoding.net/software/a-very-small-rust-binary-indeed/>)

Author: Graham King

Published: 2022-07-01T16:00:32Z

Content type: tutorial

Language: en

Sources: [Graham King](<https://devfeed.tech/sources/graham-king.md>)

Topics: [Rust](<https://devfeed.tech/topics/rust.md>), [Assembly](<https://devfeed.tech/topics/assembly.md>), [Linux](<https://devfeed.tech/topics/linux.md>), [Optimization](<https://devfeed.tech/topics/optimization.md>), [x86](<https://devfeed.tech/topics/x86.md>), [standard](<https://devfeed.tech/topics/standard.md>)

Tags: [assembly](<https://devfeed.tech/tags/assembly.md>), [linux](<https://devfeed.tech/tags/linux.md>), [optimization](<https://devfeed.tech/tags/optimization.md>), [rust](<https://devfeed.tech/tags/rust.md>), [software](<https://devfeed.tech/tags/software.md>), [standard](<https://devfeed.tech/tags/standard.md>), [standard-library](<https://devfeed.tech/tags/standard-library.md>), [x86](<https://devfeed.tech/tags/x86.md>)

### AI overview

A tutorial explores how to reduce the size of an x86_64 Linux Rust binary, starting from 3.6 MiB and applying techniques such as stripping symbols, adjusting panic handling, link-time optimization, and rebuilding the standard library. It compares the result with a pure assembly program and explains relevant Linux program-loading and Rust runtime behavior.

### Source excerpt

Can we make a Rust program that's as small as it's assembler equivalent?

## A random number you already have: The stack address

DevFeed: [A random number you already have: The stack address](<https://devfeed.tech/articles/a-random-number-you-already-have-the-stack-address-35369.md>)

Original publisher: [Read original article](<https://darkcoding.net/software/a-random-number-you-already-have/>)

Author: Graham King

Published: 2022-06-05T23:19:39Z

Content type: article

Language: en

Sources: [Graham King](<https://devfeed.tech/sources/graham-king.md>)

Topics: [Linux](<https://devfeed.tech/topics/linux.md>), [Rust](<https://devfeed.tech/topics/rust.md>), [Python](<https://devfeed.tech/topics/python.md>), [macOS](<https://devfeed.tech/topics/macos.md>), [Security](<https://devfeed.tech/topics/security.md>), [Go](<https://devfeed.tech/topics/go.md>)

Tags: [go](<https://devfeed.tech/tags/go.md>), [linux](<https://devfeed.tech/tags/linux.md>), [macos](<https://devfeed.tech/tags/macos.md>), [number](<https://devfeed.tech/tags/number.md>), [performance](<https://devfeed.tech/tags/performance.md>), [python](<https://devfeed.tech/tags/python.md>), [random](<https://devfeed.tech/tags/random.md>), [rust](<https://devfeed.tech/tags/rust.md>), [security](<https://devfeed.tech/tags/security.md>), [software](<https://devfeed.tech/tags/software.md>), [stack](<https://devfeed.tech/tags/stack.md>)

### AI overview

This article explains how Address Space Layout Randomization can make a stack variable's memory address serve as a low-cost source of random bits. It describes address-bit handling in Rust and CPython, notes that the approach does not work the same way in Go, and connects the technique to hash-table randomization and denial-of-service resistance.

### Source excerpt

Thanks to Address Space Layout Randomization you can use the address of a stack variable as a zero-cost random number.

## Return Value Optimization in Rust

DevFeed: [Return Value Optimization in Rust](<https://devfeed.tech/articles/return-value-optimization-in-rust-35456.md>)

Original publisher: [Read original article](<https://darkcoding.net/software/return-value-optimization-in-rust/>)

Author: Graham King

Published: 2022-02-26T22:49:47Z

Content type: article

Language: en

Sources: [Graham King](<https://devfeed.tech/sources/graham-king.md>)

Topics: [Optimization](<https://devfeed.tech/topics/optimization.md>), [Rust](<https://devfeed.tech/topics/rust.md>)

Tags: [code](<https://devfeed.tech/tags/code.md>), [function](<https://devfeed.tech/tags/function.md>), [memory](<https://devfeed.tech/tags/memory.md>), [optimization](<https://devfeed.tech/tags/optimization.md>), [rust](<https://devfeed.tech/tags/rust.md>), [software](<https://devfeed.tech/tags/software.md>)

### AI overview

This article explains return value optimization in Rust, showing how LLVM can place a returned value directly in the caller's stack frame to avoid memory copies. It also notes that behavior changed in Rust 1.71: reading the value's address can prevent the optimization, while inspecting the assembly reveals that optimization still occurs when the address is not accessed.

### Source excerpt

Rust avoids memory copies by optimizing return value placement.

## Rust atomics on x86: How and why

DevFeed: [Rust atomics on x86: How and why](<https://devfeed.tech/articles/rust-atomics-on-x86-how-and-why-35457.md>)

Original publisher: [Read original article](<https://darkcoding.net/software/rust-atomics-on-x86/>)

Author: Graham King

Published: 2022-01-30T23:18:06Z

Content type: article

Language: en

Sources: [Graham King](<https://devfeed.tech/sources/graham-king.md>)

Topics: [Rust](<https://devfeed.tech/topics/rust.md>), [x86](<https://devfeed.tech/topics/x86.md>), [ordering](<https://devfeed.tech/topics/ordering.md>)

Tags: [assembly](<https://devfeed.tech/tags/assembly.md>), [atomic](<https://devfeed.tech/tags/atomic.md>), [atomics](<https://devfeed.tech/tags/atomics.md>), [ordering](<https://devfeed.tech/tags/ordering.md>), [rust](<https://devfeed.tech/tags/rust.md>), [software](<https://devfeed.tech/tags/software.md>), [x86](<https://devfeed.tech/tags/x86.md>)

### AI overview

This article examines how Rust atomic memory orderings compile on x86. It finds that load and store operations generally produce the same instructions across orderings, while sequential consistency adds a full memory barrier. Read-modify-write operations also generally use the same instructions, though compiler reordering remains an important caveat.

### Source excerpt

On x86 it doesn't really matter what sync::atomic::Ordering you choose.

## Rust is also C

DevFeed: [Rust is also C](<https://devfeed.tech/articles/rust-is-also-c-35459.md>)

Original publisher: [Read original article](<https://darkcoding.net/software/rust-is-also-c/>)

Author: Graham King

Published: 2022-01-17T17:04:46Z

Content type: comparison

Language: en

Sources: [Graham King](<https://devfeed.tech/sources/graham-king.md>)

Topics: [Rust](<https://devfeed.tech/topics/rust.md>), [C](<https://devfeed.tech/topics/c.md>)

Tags: [c](<https://devfeed.tech/tags/c.md>), [pointers](<https://devfeed.tech/tags/pointers.md>), [rust](<https://devfeed.tech/tags/rust.md>), [safety](<https://devfeed.tech/tags/safety.md>), [software](<https://devfeed.tech/tags/software.md>)

### AI overview

This article compares Rust with C, arguing that Rust retains low-level capabilities such as pointer arithmetic, custom memory allocation, and inline assembly while providing conveniences including hash maps, growable arrays, UTF-8 strings, and slice references that carry length information. It also discusses Rust's safety features and direct translation of C code.

### Source excerpt

Safety is boring, let's do pointer arithmetic.

## epoll: The API that powers the modern internet

DevFeed: [epoll: The API that powers the modern internet](<https://devfeed.tech/articles/epoll-the-api-that-powers-the-modern-internet-35395.md>)

Original publisher: [Read original article](<https://darkcoding.net/software/epoll-the-api-that-powers-the-modern-internet/>)

Author: Graham King

Published: 2022-01-03T23:46:10Z

Content type: tutorial

Language: en

Sources: [Graham King](<https://devfeed.tech/sources/graham-king.md>)

Topics: [Linux](<https://devfeed.tech/topics/linux.md>), [networking](<https://devfeed.tech/topics/networking.md>), [Linux Kernel](<https://devfeed.tech/topics/linux-kernel.md>), [systems](<https://devfeed.tech/topics/systems.md>), [Programming](<https://devfeed.tech/topics/programming.md>)

Tags: [epoll](<https://devfeed.tech/tags/epoll.md>), [history](<https://devfeed.tech/tags/history.md>), [linux](<https://devfeed.tech/tags/linux.md>), [linux-kernel](<https://devfeed.tech/tags/linux-kernel.md>), [network-programming](<https://devfeed.tech/tags/network-programming.md>), [networking](<https://devfeed.tech/tags/networking.md>), [programming](<https://devfeed.tech/tags/programming.md>), [software](<https://devfeed.tech/tags/software.md>)

### AI overview

This article explains how Linux's epoll API addresses the C10K problem by efficiently handling network connections while clients or servers wait for data. It connects epoll with Go and nginx server software and contrasts it with process and thread pools, while noting related polling approaches on other operating systems.

### Source excerpt

Linux's epoll API solved the C10K problem, enabling fast and afforable Internet services.

## Scripting Minecraft server with Python

DevFeed: [Scripting Minecraft server with Python](<https://devfeed.tech/articles/scripting-minecraft-server-with-python-35465.md>)

Original publisher: [Read original article](<https://darkcoding.net/software/scripting-minecraft-server-with-python/>)

Author: Graham King

Published: 2021-12-12T00:22:11Z

Content type: tutorial

Language: en

Sources: [Graham King](<https://devfeed.tech/sources/graham-king.md>)

Topics: [Python](<https://devfeed.tech/topics/python.md>), [API](<https://devfeed.tech/topics/api.md>), [Server](<https://devfeed.tech/topics/server.md>), [Digital Ocean](<https://devfeed.tech/topics/digital-ocean.md>), [Ubuntu](<https://devfeed.tech/topics/ubuntu.md>), [Java](<https://devfeed.tech/topics/java.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [digital-ocean](<https://devfeed.tech/tags/digital-ocean.md>), [firewall](<https://devfeed.tech/tags/firewall.md>), [hosting](<https://devfeed.tech/tags/hosting.md>), [java](<https://devfeed.tech/tags/java.md>), [minecraft](<https://devfeed.tech/tags/minecraft.md>), [python](<https://devfeed.tech/tags/python.md>), [server](<https://devfeed.tech/tags/server.md>), [software](<https://devfeed.tech/tags/software.md>)

### AI overview

A practical guide to scripting a self-hosted Minecraft server with Python. It covers basic server setup on a DigitalOcean Ubuntu instance, running Paper MC, configuring the firewall, and adding the RaspberryJuice server component with the mcpi Python library.

### Source excerpt

Minecraft has an API. If you run your own server you can program it from Python.

## Rust Performance 101 in 5 Minutes

DevFeed: [Rust Performance 101 in 5 Minutes](<https://devfeed.tech/articles/rust-performance-101-in-5-minutes-35461.md>)

Original publisher: [Read original article](<https://darkcoding.net/software/rust-performance-101-in-5-minutes/>)

Author: Graham King

Published: 2021-06-16T00:00:00Z

Content type: tutorial

Language: en

Sources: [Graham King](<https://devfeed.tech/sources/graham-king.md>)

Topics: [Rust](<https://devfeed.tech/topics/rust.md>), [Optimization](<https://devfeed.tech/topics/optimization.md>), [Benchmark](<https://devfeed.tech/topics/benchmark.md>), [Linux](<https://devfeed.tech/topics/linux.md>), [Compiler](<https://devfeed.tech/topics/compiler.md>)

Tags: [benchmark](<https://devfeed.tech/tags/benchmark.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [flamegraph](<https://devfeed.tech/tags/flamegraph.md>), [hashmap](<https://devfeed.tech/tags/hashmap.md>), [json-parsing](<https://devfeed.tech/tags/json-parsing.md>), [linux](<https://devfeed.tech/tags/linux.md>), [optimization](<https://devfeed.tech/tags/optimization.md>), [performance](<https://devfeed.tech/tags/performance.md>), [rust](<https://devfeed.tech/tags/rust.md>)

### AI overview

A concise guide to diagnosing and improving CPU-bound Rust programs on Linux. It recommends repeatable benchmarks, release builds with link-time optimization, compiling for the target CPU, flamegraphs, data-structure changes, and faster libraries.

### Source excerpt

Is your Rust program CPU bound? Here are the very first things you can do on Linux.

[Next page](<https://devfeed.tech/sources/graham-king.md?cursor=WyIyMDIxLTA2LTE2VDAwOjAwOjAwKzAwOjAwIiwgIjMwZTA1ZjhjLWUxZTItNDU4NC1hNDZmLWFjYzk5M2ZlNjEwYyJd>)