performance - 在Perl 6中是否有针对类型/约束的性能惩罚的研究?

标签 performance raku

与Perl 5相比,Perl 6引入了可选的键入以及约束,例如:

# Perl 5
sub mySub {
   my $probability = $_[0];
   # Do stuff with $probability
}

# Perl 6 - using optional typing and constraints
sub mySub(Real $probability where 0 < * < 1) {
   # Do stuff with $probability
}

是否有研究调查使用这些功能时是否存在性能损失,以及在不同的Perl 6 VM上这些性能损失有多大?

我正在寻找设计合理的跨VM的产品。

最佳答案

Perl 6最完整,设计最完善的性能评估工作是https://github.com/japhb/perl6-bench,但它并不关注可选类型的相对性能。但是,它确实支持多个VM后端,因此它可能是一个不错的起点。

关于performance - 在Perl 6中是否有针对类型/约束的性能惩罚的研究?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42117027/

相关文章:

java - java中返回算术运算符

performance - 填充大量 3D 形状时 FMX ViewPort3D 性能下降

unit-testing - 如何在对模块进行单元测试时模拟导入的子例程

raku - 您如何使用 Raku 发出 HTTP 请求?

match - perl6 如何使用副词作为变量?

promise - perl6 如何获得 promise 的特定身份?

algorithm - 如何设计一个支持在 O(1) 时间内插入、删除(键,值)对以及获取最小值和最大值的数据结构?

java - Java声音回放和数据图协调的预录文件

java - Elasticsearch java 查询优化

perl - Rakudo(Perl6): What are the features that don’t yet work?