gpt4 book ai didi

regex - 从相对 URL 确定完整 URL 的最快方法是什么(给定基本 URL)

转载 作者:行者123 更新时间:2023-12-04 23:11:40 25 4
gpt4 key购买 nike

我目前正在使用模块 URI::URL从相对 URL 生成完整 URL;但是,它的运行速度并没有我希望的那么快。有谁知道另一种可能更快的方法?

最佳答案

刚刚发生在this article指出了影响 URI 的 Perl 的 Redhat/Centos/Fedora 实现中的缺点深刻地。
如果您正在运行这些 Linux 风格之一,您可能希望从原始源代码(而不是 RPM 源代码)重新编译 Perl。

I realized that anyone running perl code with the distribution perl interpretter on Redhat 5.2, Centos 5.2 or Fedora 9 is likely a victim. Yes, even if your code doesn’t use the fancy bless/overload idiom, many CPAN modules do! This google search shows 1500+ modules use the bless/overload idiom and they include some really popular ones like URI, JSON. ...

... At this point, I decided to recompile perl from source. The bug was gone. And the difference was appalling. Everything got seriously fast. CPUs were chilling at a loadavg below 0.10 and we were processing data 100x to 1000x faster!

关于regex - 从相对 URL 确定完整 URL 的最快方法是什么(给定基本 URL),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26855/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com