<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Go :: 标签 :: yafeng 的博客</title>
    <link>https://yafengabc.github.io/tags/go/index.html</link>
    <description></description>
    <generator>Hugo</generator>
    <language>zh-cn</language>
    <lastBuildDate>Sat, 19 Sep 2026 16:30:07 +0800</lastBuildDate>
    <atom:link href="https://yafengabc.github.io/tags/go/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Go vs Nim 性能实测：10 项算法、GMP 大数与 6 种 GC 的全景对比</title>
      <link>https://yafengabc.github.io/go-vs-nim-benchmark/index.html</link>
      <pubDate>Sat, 19 Sep 2026 12:30:00 +0800</pubDate>
      <guid>https://yafengabc.github.io/go-vs-nim-benchmark/index.html</guid>
      <description>用 10 项常规算法、4 项大数运算、GMP 四端对比、百万位 π 和 6 种 GC 模式，把 Go 1.26 与 Nim 2.2 完整比了一遍：谁快、快多少、为什么，以及按负载该怎么选型。</description>
    </item>
    <item>
      <title>Tailscale 搭建derp中继节点，不需要域名，不需要备案，不需要申请证书（最新）</title>
      <link>https://yafengabc.github.io/cnblogs/p18591222/index.html</link>
      <pubDate>Fri, 06 Dec 2024 17:48:00 +0800</pubDate>
      <guid>https://yafengabc.github.io/cnblogs/p18591222/index.html</guid>
      <description>既然tailscale官方derp源代码支持了IP作为HostName，当然需要测试一番。经过一番摸索，终于在阿里云，华为云成功部署。其中阿里云装的debian 12，华为云装的ubuntu 22.04.下边简单说一下步骤。&#xA;首先，第一个问题就是debian/ubuntu的仓库里的golang版本是不够的。都是1.18、1.19这样的版本。需要安装最新的golang版本。golang官方最新的版本是1.23.4，tailscale需要1.23（真够激进的）所以第一件事，就是安装最新的golang。&#xA;好在Debian有backport机制，ubuntu有最新的snap包，安装都很简单：&#xA;apt search go-1.23 Sorting... Done Full Text Search... Done golang-1.23/stable-backports,now 1.23.3-2~bpo12+1 all [installed] Go programming language compiler - metapackage golang-1.23-go/stable-backports,now 1.23.3-2~bpo12+1 amd64 [installed,automatic] Go programming language compiler, linker, compiled stdlib 所以直接安装&#xA;apt install golang-1.23 安装后需要设置一下环境变量：&#xA;export PATH=$PATH:/usr/lib/go-1.23/bin 推荐写到.bashrc，以后每次登录都会加载这个环境变量。检查一下环境变量：&#xA;echo $PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/lib/go-1.23/bin ubuntu的snap包自带最新版的golang，用下边命令安装：&#xA;snap install go --classic ubuntu的snap包安装后不用任何设置就可以使用了。安装完成后运行go version看看版本号：&#xA;go version go version go1.23.4 linux/amd64 这时候如果直接用go install会不成功，还是众所周知的原因，所以先配个代理：</description>
    </item>
    <item>
      <title>web编程速度大比拼（nodejs go python）（非专业对比）</title>
      <link>https://yafengabc.github.io/cnblogs/p5431695/index.html</link>
      <pubDate>Mon, 25 Apr 2016 17:17:00 +0800</pubDate>
      <guid>https://yafengabc.github.io/cnblogs/p5431695/index.html</guid>
      <description>C10K问题的解决，涌现出一大批新框架，或者新语言，那么问题来了:到底谁最快呢？非专业程序猿来个非专业对比。&#xA;比较程序：输出Hello World！&#xA;测试程序：siege –c 100 –r 100 –b&#xA;例子包括：&#xA;1.go用http模块实现的helloworld&#xA;2.go用martini微框架实现的Helloworld&#xA;3.python3 python2 pypy分别用gevent server tornado实现的Hello world&#xA;4.python3 python2 pypy分别用微框架bottle+gevent实现的Hello world&#xA;5.NodeJS纯JS实现的Helloworld&#xA;6.NodeJS用express框架实现的Helloworld&#xA;测试平台：&#xA;公司老旧的奔腾平台 Pentium(R) Dual-Core CPU E6700 @ 3.20GHz&#xA;内存2GB（够弱了吧）&#xA;先来宇宙最快的GO的测试：&#xA;package main import ( &#34;fmt&#34; &#34;net/http&#34; ) func sayhelloName(w http.ResponseWriter, r *http.Request){ fmt.Fprintf(w, &#34;hello world!&#34;) } func main() { http.HandleFunc(&#34;/&#34;, sayhelloName) http.ListenAndServe(&#34;:9090&#34;, nil) } 连续测试5次，成绩大体如下：&#xA;Transactions: 10000 hits Availability: 100.00 % Elapsed time: 4.11 secs Data transferred: 0.11 MB Response time: 0.03 secs Transaction rate: 2433.09 trans/sec Throughput: 0.03 MB/sec Concurrency: 79.76 Successful transactions: 10000 Failed transactions: 0 Longest transaction: 0.20 Shortest transaction: 0.00 4.11秒，不错的成绩</description>
    </item>
  </channel>
</rss>