Riyaz Puthiyapurayil via llvm-dev
2016-Jun-10 04:31 UTC
[llvm-dev] MCJIT -- Poor run-time performance for Fibonacci example in LLVM 3.8.1
We have been using LLVM 3.4 and are currently migrating to LLVM 3.8.1. We have been using the Old JIT and since it has been removed since 3.6, we have to use MCJIT. I find that run-time performance is very poor in 3.8.1 for the Fibonacci example in llvm/examples/fibonacci.cpp. Logs below for fib34 and fib381 for input values of 30 and 40. I first thought it could be that MCJIT compile time is slower, but as I increase the input value, fib381 gets slower and slower in run-time performance (almost 200X for an input value of 40). Any hints on what could be going wrong? TIA. % time fib34 30 ... starting fibonacci(30) with JIT... Result: 832040 0.008u 0.000s 0:00.01 0.0% 0+0k 0+0io 0pf+0w % time fib34 40 ... starting fibonacci(40) with JIT... Result: 102334155 0.427u 0.003s 0:00.44 95.4% 0+0k 0+0io 0pf+0w % time fib381 30 ... starting fibonacci(30) with JIT... Result: 832040 0.795u 0.001s 0:00.81 97.5% 0+0k 0+0io 0pf+0w % time fib381 40 ... starting fibonacci(40) with JIT... Result: 102334155 97.591u 0.006s 1:37.71 99.8% 0+0k 0+0io 0pf+0w Compile command used for each version (Platform: Linux 2.6.32-504.16.2.el6.x86_64): clang++ -std=c++11 fibonacci.cpp `llvm-config --cxxflags --ldflags --libs` -ldl -lpthread -lncurses -o fib381 clang++ fibonacci.cpp `llvm-config --cxxflags --ldflags --libs` -o fib34 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160610/8d291e80/attachment.html>
Renato Golin via llvm-dev
2016-Jun-10 12:38 UTC
[llvm-dev] MCJIT -- Poor run-time performance for Fibonacci example in LLVM 3.8.1
On 10 June 2016 at 05:31, Riyaz Puthiyapurayil via llvm-dev <llvm-dev at lists.llvm.org> wrote:> We have been using LLVM 3.4 and are currently migrating to LLVM 3.8.1. We > have been using the Old JIT and since it has been removed since 3.6, we have > to use MCJIT.Hi Riyaz, I don't know much about it, but MCJIT was also replaced, by a new JIT called "ORC". The Kaleidoscope example has been updated, you can look there: http://llvm.org/docs/tutorial/LangImpl4.html cheers, --renato
Lang Hames via llvm-dev
2016-Jun-11 00:06 UTC
[llvm-dev] MCJIT -- Poor run-time performance for Fibonacci example in LLVM 3.8.1
Hi Riyaz, Renato, Attempting to run Fibonacci from LLVM 3.8.1 on Darwin I get: ./fib381: Failed to construct ExecutionEngine: Interpreter has not been linked in. This suggests that the reason for the slowdown isn't in the JIT itself. Instead, when we removed the old JIT we probably didn't update the Fibonacci example to request a JIT at all, so now it's falling back to the interpreter. I'm just digging in to confirm this now, and will update the example code as needed to fix this. Cheers, Lang. On Fri, Jun 10, 2016 at 5:38 AM, Renato Golin via llvm-dev < llvm-dev at lists.llvm.org> wrote:> On 10 June 2016 at 05:31, Riyaz Puthiyapurayil via llvm-dev > <llvm-dev at lists.llvm.org> wrote: > > We have been using LLVM 3.4 and are currently migrating to LLVM 3.8.1. We > > have been using the Old JIT and since it has been removed since 3.6, we > have > > to use MCJIT. > > Hi Riyaz, > > I don't know much about it, but MCJIT was also replaced, by a new JIT > called "ORC". > > The Kaleidoscope example has been updated, you can look there: > > http://llvm.org/docs/tutorial/LangImpl4.html > > cheers, > --renato > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160610/9b196f12/attachment.html>