P
Playing with Pointers
playingwithpointers.com · Personal blog · on HN since 2010
Playing with Pointers is a blog on compilers, JIT internals, LLVM optimizations, and programming language theory.
What HN saysHN commenters recommend its LuaJIT and LLVM check widening posts, and one points to its constructive Cantor's diagonal argument in Agda.
16HN people shared it
4linked it in comments
37stories submitted
538story points
7 years agolast shared
2010people per year2026
Most-shared posts
- 1Inter-Procedural Optimization and Derefinement3 people · 47 points · first shared 2016 · 11 comments on HN
- 2Peeking inside LuaJIT - Playing With Pointers3 people · 26 points · first shared 2012 · 1 comments on HN
- 3Compiling the lambda calculus (2013)2 people · 56 points · first shared 2013 · 2 comments on HN
- 4The Variable-precision SWAR Algorithm2 people · 7 points · first shared 2013 · 1 comments on HN
- 5Cantor's diagonal argument in Agda2 people · 1 points · first shared 2014 · discussion on HN
- 6Java Optimizations and the JMM1 people · 69 points · first shared 2014 · 5 comments on HN
- 7Check Widening in LLVM1 people · 57 points · first shared 2016 · 10 comments on HN
- 8Reference Counting: Harder Than It Sounds1 people · 53 points · first shared 2016 · 24 comments on HN
- 9Macros in Haskell1 people · 50 points · first shared 2011 · 11 comments on HN
- 10Haskell's Fixed Point Combinator1 people · 36 points · first shared 2011 · 8 comments on HN
- 11A problem with LLVM's undef1 people · 30 points · first shared 2015 · 4 comments on HN
- 12A Lattice for Speculative Data Flow Analysis1 people · 24 points · first shared 2014 · 3 comments on HN
- 13Peeking into the Java Memory Model1 people · 18 points · first shared 2014 · 1 comments on HN
- 14Solving Linear Range Checks1 people · 12 points · first shared 2015 · 14 comments on HN
- 15Biased Locking and Pthreads1 people · 9 points · first shared 2013 · discussion on HN
What HN people wrote when they linked it
nickik · 2012-11-13
There are many compiler books but no books about JITs in general. There are some good blogpost about LuaJit but not that many. Following Mike Pall (MikeMike on HN or reddit is intressting too)
This is a good start:
http://playingwithpointers.com/archives/1010
nkurz · 2016-07-25
Thanks, that goes a long way toward an explanation. I'm still a bit surprised though that no compilers seem to complain even if we cast away the const from the properly const-qualified version. Here's the snippet I was playing with that tests all the variations:
https://godbolt.org/g/aaC4B7
I should have expected it, but if you define the "lying" function where the compiler can see the full definition (and don't specify -fno-inline), the loads are optimized out. It made me wonder though whether some variation of this bug might apply : http://www.playingwithpointers.com/ipo-and-derefinement.html
sanjoy_das · 2016-07-17
Is this what you're looking for: http://www.playingwithpointers.com/check-widening-in-llvm.html#final-e… ?
YorkshireSeason · 2015-07-11
Exactly. Here is an implementation of Cantor's diagonal method in Agda which is entirely constructive: http://www.playingwithpointers.com/agda-cantor.html