5

Perl 在這十年的效能改善

 1 year ago
source link: https://blog.gslin.org/archives/2022/11/16/10956/perl-%e5%9c%a8%e9%80%99%e5%8d%81%e5%b9%b4%e7%9a%84%e6%95%88%e8%83%bd%e6%94%b9%e5%96%84/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Perl 在這十年的效能改善

看到「Perl performance evolution over the last decade」這篇,作者看到大家在講 Python 3.11 的效能改善後,也想看一下 Perl 這邊的效能改善。

作者從 2012 年的 Perl 5.12 開始測,到 2022 年出的 Perl 5.36,最後面的表可以看到大概是 30%:

XixacYx.png

以十年的跨度來看,30% 成長不怎麼多,但畢竟還是有效能提昇,用很舊的版本的人還是可以考慮昇個級,沒撞到相容性問題的話算是免費的效能提昇。

當年比較驚人的應該還是 PHP 的 5.6 到 7.0,效能差不多是翻倍,讓整個 PHP community 有更多的資源可以用,framework 可以寫的更揮霍一些 XD

Related

Perl 5.10.0

在 FreeBSD 上一堆 ports maintainer 要傷腦筋處理 Perl 5.8 與 Perl 5.10 之間的相容性問題了... Perl 5.10.0 除了修正 bug 外,在效率上也做了許多改進,在 perl5100delta 可以查到完整的內容,幾個我比較有興趣的: 引入 // 運算子。以前寫 defined $a ? $a : $b,現在可以寫 $a // $b。同理,$a //= $b 等價於 $a = (defined $a ? $a : $b),表示 $a 沒有被定義時塞入 $b。另外,// 與 || 有相同的優先權。 有了 switch-case-default…

December 21, 2007

In "Computer"

PHP 7.2 的效能改善

作者在「PHP 7.1 vs 7.2 Benchmarks (with Docker and Symfony Flex)」這邊拿 Symfony 測試 PHP 7.2 的效能,發現效能提昇主要來自於多個連線時的情境: 前面的數字是前端頁面 (用了 Twig),後面的數字是純 API 呼叫。都可以看出 conc = 1 時其實沒有顯著差異,但只要有多個連線同時存取時,效能的提昇就會展現出來。對於繁忙的站台感覺會有不少幫助... 作者的猜測是 opcache 模組的改善,也就是在這段提到的: - Opcache: . Added global optimisation passes based on data flow analysis using Single Static Assignment (SSA) form: Sparse Conditional Constant Propagation (SCCP),…

October 18, 2017

In "Computer"

InnoDB redo log 大小對效能的影響

在「Benchmark(et)ing with InnoDB redo log size」這邊看到在討論 InnoDB redo log 的大小對效能的影響 (也就是 innodb_log_file_size 與 innodb_log_files_in_group)。 開頭就有先提到重點,在新版 MySQL 裡,幾乎所有的情況比較大的 redo log 有比較好的效能 (平均值): tl;dr - conclusions specific to my test A larger redo log improves throughput A larger redo log helps more with slower storage than with faster storage because page writeback…

May 15, 2017

In "Computer"

a611ee8db44c8d03a20edf0bf5a71d80?s=49&d=identicon&r=gAuthor Gea-Suan LinPosted on November 16, 2022Categories Computer, Murmuring, Programming, SoftwareTags benchmark, performance, perl, speed

Leave a Reply

Your email address will not be published. Required fields are marked *

Comment *

Name *

Email *

Website

Notify me of follow-up comments by email.

Notify me of new posts by email.

To respond on your own website, enter the URL of your response which should contain a link to this post's permalink URL. Your response will then appear (possibly after moderation) on this page. Want to update or remove your response? Update or delete your post and re-enter your post's URL again. (Learn More)

Post navigation


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK