{
    "version": "https://jsonfeed.org/version/1",
    "title": "Axiomofchoice's Blog",
    "home_page_url": "https://axiomofchoice-hjt.github.io",
    "feed_url": "https://axiomofchoice-hjt.github.io/feed.json",
    "description": "一个退役败犬的个人博客 (C++ / HPC / Algorithm)",
    "items": [
        {
            "id": "https://axiomofchoice-hjt.github.io/pages/378b25/",
            "url": "https://axiomofchoice-hjt.github.io/pages/378b25/",
            "title": "DeepSeek MTP 踩坑记录",
            "summary": "排查 DeepSeek MTP 接受率低一周，内存、精度、采样算法都怀疑过，最后发现是技术报告里那张图让我误判了 MTP Module 的结构。",
            "date_modified": "2026-09-20T17:23:17.000Z"
        },
        {
            "id": "https://axiomofchoice-hjt.github.io/pages/f68c6b/",
            "url": "https://axiomofchoice-hjt.github.io/pages/f68c6b/",
            "title": "只读 O(1) 空间选择算法",
            "summary": "如何在只读、只能申请 O(1) 空间的数组里求第 k 小值。从朴素的 O(n²) 出发，介绍根号算法和通用递归算法，把复杂度逐步降到 O(n^(1+ε))，并讨论目前已知的最好上下界与这个问题的开放之处。",
            "date_modified": "2026-09-05T03:21:08.000Z"
        },
        {
            "id": "https://axiomofchoice-hjt.github.io/pages/c8ca67/",
            "url": "https://axiomofchoice-hjt.github.io/pages/c8ca67/",
            "title": "单趟最小空间中位数算法",
            "summary": "单趟介绍最小空间中位数算法：只遍历一遍输入、用 ⌊n/2⌋+2 额外空间、在 O(n) 时间内求出中位数。",
            "date_modified": "2026-08-22T22:28:11.000Z"
        },
        {
            "id": "https://axiomofchoice-hjt.github.io/pages/7f2a8c/",
            "url": "https://axiomofchoice-hjt.github.io/pages/7f2a8c/",
            "title": "在 INT8 硬件上模拟 MXFP4 矩阵乘",
            "summary": "把 MXFP4 的 Per-Block 量化改造成 Per-Channel 量化，用查表加右移在只有 INT8 算力的硬件上高效模拟 MXFP4 矩阵乘。",
            "date_modified": "2026-08-13T15:20:00.000Z"
        },
        {
            "id": "https://axiomofchoice-hjt.github.io/pages/5da6a9/",
            "url": "https://axiomofchoice-hjt.github.io/pages/5da6a9/",
            "title": "数组的 O(1) 时间复杂度之所以高效是因为内存连续性吗",
            "summary": "本文从算法理论与计算机组成原理双重视角出发，深入探讨了连续性作为“手段”而非“本质”的底层逻辑，并解析了为何工程实践中可以安全地假设数组访问为常数时间。",
            "date_modified": "2026-08-01T02:32:10.000Z"
        },
        {
            "id": "https://axiomofchoice-hjt.github.io/pages/07c6a5/",
            "url": "https://axiomofchoice-hjt.github.io/pages/07c6a5/",
            "title": "替罪羊表",
            "summary": "一个 1981 年的冷门数据结构，用数组 + 线段树 + 替罪羊机制实现 O(log² n) 插入的有序容器。",
            "date_modified": "2026-07-25T19:22:11.000Z"
        },
        {
            "id": "https://axiomofchoice-hjt.github.io/pages/118fb5/",
            "url": "https://axiomofchoice-hjt.github.io/pages/118fb5/",
            "title": "如何用 100 颗相同石头实现最大计数范围",
            "summary": "",
            "date_modified": "2026-07-08T22:24:42.000Z"
        },
        {
            "id": "https://axiomofchoice-hjt.github.io/pages/1aa983/",
            "url": "https://axiomofchoice-hjt.github.io/pages/1aa983/",
            "title": "O(n) 原地稳定去重",
            "summary": "本文将 std::unique 升级为真正的 O(n) 原地稳定去重，利用分块策略与旋转技巧，在不占用额外内存的前提下保证相同元素原始顺序。同时剖析了多重集操作（交集、并集）遇到的理论与工程挑战。",
            "date_modified": "2026-07-04T00:06:57.000Z"
        },
        {
            "id": "https://axiomofchoice-hjt.github.io/pages/e2847a/",
            "url": "https://axiomofchoice-hjt.github.io/pages/e2847a/",
            "title": "原地稳定循环排序和最少移动",
            "summary": "看了一下之前遗留的论文，有个小算法可以记录一下。这个排序将循环排序 (cycle sort) 改造成了稳定排序，并保持 O(n) 的移动次数。",
            "date_modified": "2026-06-18T00:45:19.000Z"
        },
        {
            "id": "https://axiomofchoice-hjt.github.io/pages/74ae0e/",
            "url": "https://axiomofchoice-hjt.github.io/pages/74ae0e/",
            "title": "原地三路快速排序",
            "summary": "从快速排序的经典实现与固有缺陷出发，逐步引入中位数选择、自底向上的块划分，并重点介绍了双哨兵机制，完全消除了调用栈，实现严格 O(1) 额外空间的原地三路快速排序。",
            "date_modified": "2026-06-07T13:37:30.000Z"
        },
        {
            "id": "https://axiomofchoice-hjt.github.io/pages/8da648/",
            "url": "https://axiomofchoice-hjt.github.io/pages/8da648/",
            "title": "O(n) 原地选择的稳定版本",
            "summary": "本文拆解了论文《Sorting multisets stably in minimum space》中的稳定选择算法，在 BFPRT 的基础上，硬扛原地、稳定、O(n) 三重约束。",
            "date_modified": "2026-06-05T01:08:42.000Z"
        },
        {
            "id": "https://axiomofchoice-hjt.github.io/pages/60450e/",
            "url": "https://axiomofchoice-hjt.github.io/pages/60450e/",
            "title": "O(n) 原地稳定反划分",
            "summary": "本文详解 O(n) 时间、O(1) 空间的原地稳定反划分算法——稳定划分的逆操作。通过缓冲区提取、块缩小与原地置换，在不破坏相对顺序的前提下，将已划分的数组按任意 0‑1 模式精确重排。",
            "date_modified": "2026-05-23T01:48:18.000Z"
        },
        {
            "id": "https://axiomofchoice-hjt.github.io/pages/63a6df/",
            "url": "https://axiomofchoice-hjt.github.io/pages/63a6df/",
            "title": "O(n) 原地选择的不稳定版本",
            "summary": "本文探讨了如何在 O(n) 时间复杂度和严格 O(1) 额外空间的原地限制下解决 top-k 选择问题。基于 1988 年论文 Implicit Selection，文章完整阐述了消除 BFPRT 算法递归栈的核心技术。",
            "date_modified": "2026-05-10T17:30:55.000Z"
        },
        {
            "id": "https://axiomofchoice-hjt.github.io/pages/0d69d8/",
            "url": "https://axiomofchoice-hjt.github.io/pages/0d69d8/",
            "title": "O(n) 原地稳定划分",
            "summary": "本文深入解析 O(n) 原地稳定划分（0‑1 排序）的完整实现方案。通过提取缓冲区、在 Word 和缓冲区内编码目标位置、块同质化与块增长等技巧，将原论文中晦涩的部分简化为常数次分块倍增过程，最终以 200 余行 C++ 代码完整实现。文章兼顾算法思路、实现细节与踩坑记录，适合想要理解并复现该经典算法的读者。",
            "date_modified": "2026-05-02T00:08:00.000Z"
        },
        {
            "id": "https://axiomofchoice-hjt.github.io/pages/1b8e07/",
            "url": "https://axiomofchoice-hjt.github.io/pages/1b8e07/",
            "title": "原地算法系列",
            "summary": "文章从图灵机到 Word RAM 模型，严谨厘清“原地算法”的定义边界；以 BFPRT（中位数的中位数）为例，给出 O(n) 最坏复杂度原地选择算法的完整推导与代码，并探讨递归栈空间与工程取舍。",
            "date_modified": "2026-04-18T15:41:04.000Z"
        },
        {
            "id": "https://axiomofchoice-hjt.github.io/pages/326ae9/",
            "url": "https://axiomofchoice-hjt.github.io/pages/326ae9/",
            "title": "O(n) 原地归并的稳定版本",
            "summary": "在常数空间下实现稳定归并的完整工程化方案：基于分块、唯一值提取与双/单缓冲区设计，将原地归并推进到 $O(n)$ 时间，并进一步支撑稳定的 $O(n\\log n)$ 原地归并排序。",
            "date_modified": "2026-04-12T17:07:28.000Z"
        },
        {
            "id": "https://axiomofchoice-hjt.github.io/pages/c829b5/",
            "url": "https://axiomofchoice-hjt.github.io/pages/c829b5/",
            "title": "O(n) 原地归并的不稳定版本",
            "summary": "一个线性时间、常数空间的原地归并算法（不稳定版本）。通过分块、选择排序与缓冲区归并，将传统 O(n log n) 的 merge 降到线性复杂度，是原地排序理论中的经典技巧实现。",
            "date_modified": "2026-03-25T12:55:37.000Z"
        },
        {
            "id": "https://axiomofchoice-hjt.github.io/pages/34052d/",
            "url": "https://axiomofchoice-hjt.github.io/pages/34052d/",
            "title": "Chunked Pipeline Parallelism",
            "summary": "记录一个优雅的超长上下文 prefill 部署思路 Chunked Pipeline Parallelism，能利用多节点的性能，同时避免了多节点的 Attention 通信开销。",
            "date_modified": "2026-03-21T13:34:19.000Z"
        },
        {
            "id": "https://axiomofchoice-hjt.github.io/pages/ecc5af/",
            "url": "https://axiomofchoice-hjt.github.io/pages/ecc5af/",
            "title": "一个 PRAM 并行算法模拟器",
            "summary": "轻量级的 PRAM 并行算法模拟器 pramsim，基于 C++20 协程实现。支持 EREW / CREW / CRCW 模型，提供直观的并行算法编写体验。代码仅 500 余行，适合学习和扩展。",
            "date_modified": "2026-03-12T23:55:25.000Z"
        },
        {
            "id": "https://axiomofchoice-hjt.github.io/pages/b86c12/",
            "url": "https://axiomofchoice-hjt.github.io/pages/b86c12/",
            "title": "数组求和的溢出问题",
            "summary": "一个面试题，int64 数组求和，题目不保证中间过程不会溢出，只能保证结果不溢出。",
            "date_modified": "2026-03-11T19:46:52.000Z"
        },
        {
            "id": "https://axiomofchoice-hjt.github.io/pages/5542b5/",
            "url": "https://axiomofchoice-hjt.github.io/pages/5542b5/",
            "title": "大模型 MoE 负载均衡踩坑记录",
            "summary": "这是一篇从 KL 散度“分布均匀性优化”转向峰均比“极值统计建模”的工程复盘。",
            "date_modified": "2026-02-28T00:18:45.000Z"
        },
        {
            "id": "https://axiomofchoice-hjt.github.io/pages/1a8ff1/",
            "url": "https://axiomofchoice-hjt.github.io/pages/1a8ff1/",
            "title": "原地算法的对称性：从 inplace merge 到 stable partition",
            "summary": "围绕“原地算法”的结构对称性，从 inplace merge 与 stable partition 两个经典 O(n log n) 算法切入，讨论 rotate 操作在分治中的核心作用，以及快速排序与归并排序在原地稳定算法里的镜像关系。",
            "date_modified": "2026-02-07T22:34:30.000Z"
        },
        {
            "id": "https://axiomofchoice-hjt.github.io/pages/cef419/",
            "url": "https://axiomofchoice-hjt.github.io/pages/cef419/",
            "title": "底层视角的返回值优化",
            "summary": "从原理和例子分析 RVO",
            "date_modified": "2026-01-08T22:48:34.000Z"
        },
        {
            "id": "https://axiomofchoice-hjt.github.io/pages/1d919a/",
            "url": "https://axiomofchoice-hjt.github.io/pages/1d919a/",
            "title": "浮点数条件运算的性能分析",
            "summary": "性能分析报告",
            "date_modified": "2025-10-06T11:40:29.000Z"
        },
        {
            "id": "https://axiomofchoice-hjt.github.io/pages/7f244c/",
            "url": "https://axiomofchoice-hjt.github.io/pages/7f244c/",
            "title": "C++为什么没有虚的成员函数模板",
            "summary": "面试题的一些思路",
            "date_modified": "2025-10-05T16:25:53.000Z"
        },
        {
            "id": "https://axiomofchoice-hjt.github.io/pages/a037bf/",
            "url": "https://axiomofchoice-hjt.github.io/pages/a037bf/",
            "title": "败犬のC++专题 宏魔法篇",
            "summary": "",
            "date_modified": "2025-09-18T00:00:00.000Z"
        },
        {
            "id": "https://axiomofchoice-hjt.github.io/pages/002fc6/",
            "url": "https://axiomofchoice-hjt.github.io/pages/002fc6/",
            "title": "最小椭圆覆盖",
            "summary": "一个难度超模的保研机试题",
            "date_modified": "2025-09-03T22:17:50.000Z"
        },
        {
            "id": "https://axiomofchoice-hjt.github.io/pages/29b8f6/",
            "url": "https://axiomofchoice-hjt.github.io/pages/29b8f6/",
            "title": "巴恩斯利蕨",
            "summary": "奇怪的代码",
            "date_modified": "2024-11-17T15:06:14.000Z"
        },
        {
            "id": "https://axiomofchoice-hjt.github.io/pages/f78cb0/",
            "url": "https://axiomofchoice-hjt.github.io/pages/f78cb0/",
            "title": "SME 指令集使用指南",
            "summary": "ARM 矩阵指令集",
            "date_modified": "2024-09-16T23:04:19.000Z"
        },
        {
            "id": "https://axiomofchoice-hjt.github.io/pages/d787b3/",
            "url": "https://axiomofchoice-hjt.github.io/pages/d787b3/",
            "title": "BLAS GEMM 接口",
            "summary": "BLAS 矩阵乘法接口",
            "date_modified": "2024-08-17T21:03:51.000Z"
        },
        {
            "id": "https://axiomofchoice-hjt.github.io/pages/5c59de/",
            "url": "https://axiomofchoice-hjt.github.io/pages/5c59de/",
            "title": "翻硬币与旋转棋盘问题",
            "summary": "策略问题",
            "date_modified": "2024-07-04T22:15:12.000Z"
        },
        {
            "id": "https://axiomofchoice-hjt.github.io/pages/22df72/",
            "url": "https://axiomofchoice-hjt.github.io/pages/22df72/",
            "title": "用户态线程同步",
            "summary": "无锁同步指北",
            "date_modified": "2024-06-15T22:49:01.000Z"
        },
        {
            "id": "https://axiomofchoice-hjt.github.io/pages/62c8f3/",
            "url": "https://axiomofchoice-hjt.github.io/pages/62c8f3/",
            "title": "测量多线程每个线程的运行时间",
            "summary": "解决竞争获取系统时间的问题",
            "date_modified": "2024-06-13T22:06:32.000Z"
        },
        {
            "id": "https://axiomofchoice-hjt.github.io/pages/f2fc10/",
            "url": "https://axiomofchoice-hjt.github.io/pages/f2fc10/",
            "title": "更自由的 perf 采样实践",
            "summary": "在程序中间 perf stat",
            "date_modified": "2024-05-26T02:20:56.000Z"
        },
        {
            "id": "https://axiomofchoice-hjt.github.io/pages/1abfb8/",
            "url": "https://axiomofchoice-hjt.github.io/pages/1abfb8/",
            "title": "如何做好 benchmark",
            "summary": "benchmark 小寄巧",
            "date_modified": "2024-05-02T16:09:42.000Z"
        },
        {
            "id": "https://axiomofchoice-hjt.github.io/pages/86fdbe/",
            "url": "https://axiomofchoice-hjt.github.io/pages/86fdbe/",
            "title": "xbyak 汇编开发姿势",
            "summary": "用 xbyak 库生成静态链接库",
            "date_modified": "2024-03-23T17:20:28.000Z"
        },
        {
            "id": "https://axiomofchoice-hjt.github.io/pages/85c4ed/",
            "url": "https://axiomofchoice-hjt.github.io/pages/85c4ed/",
            "title": "集合求并的极致优化",
            "summary": "分支、SIMD、并发",
            "date_modified": "2023-12-23T22:08:56.000Z"
        },
        {
            "id": "https://axiomofchoice-hjt.github.io/pages/c1e151/",
            "url": "https://axiomofchoice-hjt.github.io/pages/c1e151/",
            "title": "浮点数误差入门",
            "summary": "理论的误差估计",
            "date_modified": "2023-12-19T23:05:16.000Z"
        },
        {
            "id": "https://axiomofchoice-hjt.github.io/pages/f7352c/",
            "url": "https://axiomofchoice-hjt.github.io/pages/f7352c/",
            "title": "大学阶段回顾和总结",
            "summary": "大学回顾",
            "date_modified": "2023-12-17T23:15:51.000Z"
        },
        {
            "id": "https://axiomofchoice-hjt.github.io/pages/342a8d/",
            "url": "https://axiomofchoice-hjt.github.io/pages/342a8d/",
            "title": "理想的并行排序算法",
            "summary": "如果某CPU有无限个核心，那么时间复杂度最小的排序算法是怎么样的？",
            "date_modified": "2023-11-19T01:09:21.000Z"
        },
        {
            "id": "https://axiomofchoice-hjt.github.io/pages/0fc19d/",
            "url": "https://axiomofchoice-hjt.github.io/pages/0fc19d/",
            "title": "有没有计算时间复杂度的算法",
            "summary": "一点证明思路",
            "date_modified": "2023-10-06T23:54:00.000Z"
        },
        {
            "id": "https://axiomofchoice-hjt.github.io/pages/451424/",
            "url": "https://axiomofchoice-hjt.github.io/pages/451424/",
            "title": "HDU ACM 从入门到入坟",
            "summary": "给 HDU 新生的 ACM 建议",
            "date_modified": "2023-07-25T02:23:03.000Z"
        },
        {
            "id": "https://axiomofchoice-hjt.github.io/pages/dec161/",
            "url": "https://axiomofchoice-hjt.github.io/pages/dec161/",
            "title": "如何写C++项目",
            "summary": "项目指北",
            "date_modified": "2023-03-24T19:50:38.000Z"
        },
        {
            "id": "https://axiomofchoice-hjt.github.io/pages/a651e2/",
            "url": "https://axiomofchoice-hjt.github.io/pages/a651e2/",
            "title": "随机数生成问题 连续",
            "summary": "收集一些算法",
            "date_modified": "2023-01-02T17:21:05.000Z"
        },
        {
            "id": "https://axiomofchoice-hjt.github.io/pages/22ee97/",
            "url": "https://axiomofchoice-hjt.github.io/pages/22ee97/",
            "title": "随机数生成问题 离散",
            "summary": "收集一些算法",
            "date_modified": "2022-11-29T23:51:59.000Z"
        },
        {
            "id": "https://axiomofchoice-hjt.github.io/pages/04ae8d/",
            "url": "https://axiomofchoice-hjt.github.io/pages/04ae8d/",
            "title": "用汇编分析一下各种交换方法的性能",
            "summary": "汇编入门",
            "date_modified": "2022-10-03T18:14:04.000Z"
        },
        {
            "id": "https://axiomofchoice-hjt.github.io/pages/9f1388/",
            "url": "https://axiomofchoice-hjt.github.io/pages/9f1388/",
            "title": "大学求职经历",
            "summary": "找实习/工作的一些感想",
            "date_modified": "2022-04-13T12:58:03.000Z"
        },
        {
            "id": "https://axiomofchoice-hjt.github.io/pages/aca146/",
            "url": "https://axiomofchoice-hjt.github.io/pages/aca146/",
            "title": "思想实验：让 Python 拥有 C 的性能",
            "summary": "性能杂谈",
            "date_modified": "2022-03-25T14:29:36.000Z"
        },
        {
            "id": "https://axiomofchoice-hjt.github.io/pages/5b222d/",
            "url": "https://axiomofchoice-hjt.github.io/pages/5b222d/",
            "title": "博客搭建过程记录",
            "summary": "一点点踩坑记录",
            "date_modified": "2022-03-08T18:08:00.000Z"
        },
        {
            "id": "https://axiomofchoice-hjt.github.io/pages/220100/",
            "url": "https://axiomofchoice-hjt.github.io/pages/220100/",
            "title": "球盒模型",
            "summary": "算法竞赛有用科技",
            "date_modified": "2022-01-14T17:35:18.000Z"
        }
    ]
}