Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^2: Perl 6 and performance

by kikuchiyo (Hermit)
on Feb 09, 2012 at 19:32 UTC ( [id://952817]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    time ./perl6 -e 'my $s; for 1..10000 {$s+=1./$_**2};say $s'
    ===SORRY!===
    Unable to parse blockoid, couldn't find final '}' at line 2
    
  2. or download this
    ./perl6 -e 'my $s;my Num $i;for 1..10000 -> $i {$s+=1/$i**2};say $s'
    
  3. or download this
    ./perl6 -e 'my Num $s;my Num $i;for 1..10000 -> $i {$s+=1/$i**2};say $
    +s'
    Type check failed in assignment to '$s'; expected 'Num' but got 'Rat'
    ...
      in method eager at src/gen/CORE.setting:4715
      in method eager at src/gen/CORE.setting:1028
      in sub eager at src/gen/CORE.setting:5000
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://952817]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (4)
As of 2024-04-25 20:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found