jvm-tail-recursion:Java字节码中的尾部递归调用的优化器库

时间:2024-04-08 11:36:36
【文件属性】:

文件名称:jvm-tail-recursion:Java字节码中的尾部递归调用的优化器库

文件大小:341KB

文件格式:ZIP

更新时间:2024-04-08 11:36:36

tail-recursion optimization-tools jvm-bytecode saker-build Java

jvm-tail-递归 在Java字节码上执行尾部递归优化的Java库。它只是将函数中的最终递归方法调用替换为goto到同一函数的开头。 该项目使用执行字节码操作。 例子 倒数至零 一个简单的尾递归函数,倒数为零: 前 后 static void count( int n) { if (n == 0 ) { return ; } count(n - 1 ); } static void count( int n) { while ( true ) { if (n == 0 ) { return ; } n = n - 1 ; } } 列出字符串中的数字 如果您想在字符串中使用数字序列: 前 后 static String numbers( int n,


网友评论