Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

openlibm performance on ARM server is very poor

未关闭
#282 7 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
32/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
停滞
技术栈
c
领域
performance

调研方向

首先复现报告中的 ARM 基准测试,并检查 make ARCH=aarch64 的构建路径,包括 aarch64 和 ld128 目录以及 src/e_j0.c。将生成的实现和基准测试结果与 system libm 和 musl 进行比较;完成标准是找出并解决报告中的 ARM 性能差距,同时不使其他函数发生回归。

由索引模型根据 Issue 内容生成。

描述

arm performance

I see very poor results on a modern ARM server. Some openlibm implementations are up to 48.68x slower than their libm counterparts. This was a checkout of the main branch at 12f5ffc This is also related to #234, but the performance difference seems to be even more dramatic.

For interest and potential usefulness to #203, I also compared it against an optimized build of musl 1.2.4:

bench-syslibm              | bench-openlibm             | bench-musl
  pow     :   78.6387 MPS  |   pow     :   17.3955 MPS  |   pow     :   57.9493 MPS
  hypot   :  232.7852 MPS  |   hypot   :    4.7823 MPS  |   hypot   :  139.4793 MPS
  exp     :  317.8124 MPS  |   exp     :  119.9932 MPS  |   exp     :  215.2262 MPS
  log     :  228.3188 MPS  |   log     :   97.0294 MPS  |   log     :  181.7701 MPS
  log10   :  118.6787 MPS  |   log10   :   73.0237 MPS  |   log10   :   76.8402 MPS
  sin     :  133.0101 MPS  |   sin     :  135.6112 MPS  |   sin     :  165.5926 MPS
  cos     :  144.4003 MPS  |   cos     :  127.8527 MPS  |   cos     :  150.5435 MPS
  tan     :  105.8875 MPS  |   tan     :   68.8512 MPS  |   tan     :   78.9428 MPS
  asin    :  178.2302 MPS  |   asin    :    9.6621 MPS  |   asin    :   88.3722 MPS
  acos    :  154.1304 MPS  |   acos    :    9.9192 MPS  |   acos    :   98.5818 MPS
  atan    :  190.8853 MPS  |   atan    :   91.6229 MPS  |   atan    :   97.0451 MPS
  atan2   :   56.6821 MPS  |   atan2   :   42.4876 MPS  |   atan2   :   47.6644 MPS
  

GNU libc version: 2.35
GNU libc release: stable

The openlibm compilation line looks like:

cc   -fno-gnu89-inline -fno-builtin -O3 -fPIC  -std=c99 -Wall -I/home/user/openlibm -I/home/user/openlibm/include -I/home/user/openlibm/aarch64 -I/home/user/openlibm/src -DASSEMBLER -D__BSD_VISIBLE -Wno-implicit-function-declaration -I/home/user/openlibm/ld128 -c src/e_j0.c -o src/e_j0.c.o

I have tried compiling openlibm with just bare make, and also specifying the architecture directly with make ARCH=aarch64 to identical results.

Is there something we can do about this?

主要语言
C
星标
637
派生
164
PR 合并指标
30 天内没有已合并 PR

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

JuliaMath/openlibm 的其他 Issue

查看 JuliaMath/openlibm 的全部 Issue

相似的 Issue

更多 C Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。