是否有关于 Perl 6 中类型/约束的性能惩罚的研究? [英] Is there research on performance penalties for types/constraints in Perl 6?

查看:39
本文介绍了是否有关于 Perl 6 中类型/约束的性能惩罚的研究?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

In contrast with Perl 5, Perl 6 introduced optional typing, as well as constraints, e.g.:

# 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 上的影响有多大?

Have there been studies that investigate whether there are performance penalties, and how large are they on different Perl 6 VMs, when using these capabilities?

我正在寻找设计精良、跨虚拟机的东西.

I'm looking for something well designed, and cross-VM.

推荐答案

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

The most complete and well designed performance measurement work for Perl 6 is https://github.com/japhb/perl6-bench but it does not focus on the relative performance of optional typing. It does however have support for multiple VM backends so it might be a good place to start.

这篇关于是否有关于 Perl 6 中类型/约束的性能惩罚的研究?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆