This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
["f", "Show next/latest diffs", "setProposedDiffBounds()"], | |
["n", "Next unreviewed file", "nextUnreviewedFile()"], | |
["p", "Previous unreviewed file", "prevUnreviewedFile()"], | |
[null, "Next personally unreviewed file", "nextPersonallyUnreviewedFile()"], | |
[null, "Previous personally unreviewed file", "prevPersonallyUnreviewedFile()"], | |
["shift+n", "Next changed file", "nextChangedFile()"], | |
["shift+p", "Previous changed file", "prevChangedFile()"], | |
[null, "Next visible file", "nextVisibleFile()"], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mode \ n_max | 30000 | 100000 | 300000 | 1000000 | |
---|---|---|---|---|---|
LuaJIT interpreted | 98 | 567 | 2900 | 17600 | |
LuaJIT JIT-compiled | 21 | 96 | 462 | 2609 | |
relative speedup | 4.72 | 5.88 | 6.27 | 6.75 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- BYTECODE -- euler021.lua:1-17 ; divisors_sum(r0) | |
0001 KSHORT 1 0 ; r1 = 0 | |
0002 KSHORT 2 1 ; r2 = 1 | |
0003 ISGE 2 0 ; if r2 >= r0 | |
0004 JMP 2 => 0006 ; goto 0006 | |
0005 KSHORT 1 1 ; r1 = 1 | |
0006 => KSHORT 2 2 ; r2 = 2 | |
0007 => MULVV 3 2 2 ; r3 = r2 * r2 | |
0008 ISGT 3 0 ; if r3 > r0 | |
0009 JMP 3 => 0023 ; goto 0023 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local function divisors_sum(n) | |
local sum = 0 | |
if n > 1 then | |
sum = 1 | |
end | |
local k = 2 | |
while k*k <= n do | |
if n % k == 0 then | |
sum = sum + k + n/k | |
if k*k == n then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
== SLIDES == | |
1. Beamer | |
http://www.stattler.com/article/ready-made-beamer-presentation-template | |
http://carlesm.com/2007/04/latex-beamer-templates-2/ | |
http://nicku.org/teaching-template-system-source/index.shtml | |
http://deic.uab.es/~iblanes/beamer_gallery/index_by_theme.html | |
== GRAPHICS == |