search for: fib

Displaying 20 results from an estimated 165 matches for "fib".

Did you mean: fi
2011 Apr 08
1
R and lazy evaluation
Haskell is the prototypical lazy evaluation language. One can compute a Fibonacci sequence by the Haaskell equivalent of the following R code. > fibs <- c(0, 1, rep(0, 8)) > fibs[3:10] <- fibs + fibs[-1] This works as follows. fibs = 0, 1, 0, 0, 0, 0, 0, 0, 0, 0 fibs = 0, 1, 0, 0, 0, 0, 0, 0, 0, 0 When one adds fibs to fibs[-1], one is effectively adding di...
2010 Sep 03
6
[LLVMdev] Why clang inlines with -O3 flag and opt doesn't?
When I compile my C fibonacci example fib.c with 'clang -O3 -c -emit-llvm -o fib-clang.bc fib.c&& llvm-dis fib-clang.bc' I get fib-clang.ll that has some degree of inlining in it. But when I get an equivalent to fib.c file fib.ll and run it through opt with the command 'llvm-as fib.ll&& opt...
2010 Apr 29
2
[LLVMdev] Why the same code is much slower in JIT compared to separate executable?
I run the same simple Fibonacci computing code in JIT and as a native executable. I see that with argument 45 JIT runs for 11.3sec and executable runs for 7.5sec. Why there is such difference? Yuri -------- fib.ll -------- ; ModuleID = 'all.bc' @.str = private constant [12 x i8] c"fib(%i)=%i\0A\00", a...
2004 Aug 17
4
[LLVMdev] JIT API example (fibonacci)
...omparison to gcc 3.3.3 on my Athlon XP 1500. Nice. P.S. guys, no fears, I don't plan to flood the cvs repository with my "brilliant" examples ;) --- Valery A.Khamenya -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: fibonacci.cpp URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20040818/be76718a/attachment.ksh>
2004 Aug 17
5
[LLVMdev] JIT API example (fibonacci)
...on't plan to flood the cvs repository > > with my "brilliant" examples ;) > > > > --- > > Valery A.Khamenya > > > > > > > > > > ------------------------------------------------------------------------ > > > > //===--- fibonacci.cpp - An example use of the JIT ----------------------===// > > // > > // The LLVM Compiler Infrastructure > > // > > // This file was developed by Valery A. Khamenya and is distributed under the > > // University of Illinois Open Source Licen...
2004 Aug 17
0
[LLVMdev] JIT API example (fibonacci)
...t; Nice. > > P.S. guys, no fears, I don't plan to flood the cvs repository > with my "brilliant" examples ;) > > --- > Valery A.Khamenya > > > > > ------------------------------------------------------------------------ > > //===--- fibonacci.cpp - An example use of the JIT ----------------------===// > // > // The LLVM Compiler Infrastructure > // > // This file was developed by Valery A. Khamenya and is distributed under the > // University of Illinois Open Source License. See LICENSE.TXT for...
2004 Aug 17
0
[LLVMdev] JIT API example (fibonacci)
...vs repository >>> with my "brilliant" examples ;) >>> >>>--- >>>Valery A.Khamenya >>> >>> >>> >>> >>>------------------------------------------------------------------------ >>> >>>//===--- fibonacci.cpp - An example use of the JIT ----------------------===// >>>// >>>// The LLVM Compiler Infrastructure >>>// >>>// This file was developed by Valery A. Khamenya and is distributed under the >>>// University of Illinois Open So...
2018 Jan 30
7
[Bug 1221] New: "fib" produces strange results with an IPv6 default route
https://bugzilla.netfilter.org/show_bug.cgi?id=1221 Bug ID: 1221 Summary: "fib" produces strange results with an IPv6 default route Product: nftables Version: unspecified Hardware: x86_64 OS: Debian GNU/Linux Status: NEW Severity: major Priority: P5 Component: ker...
2004 Aug 18
1
[LLVMdev] JIT API example (fibonacci)
...wanted me to > move the entire directories under a "small examples" directory? You're right. The simples way to do this would be to have: projects/ SmallExamples/ ModuleMaker/ HowToUseTheJIT/ FibBuilder/ etc. Each subsubdir would have a makefile and a .cpp file. -Chris > Chris Lattner wrote: > > > On Tue, 17 Aug 2004, Reid Spencer wrote: > > > > > >>That's pretty cute actually. Do you want this "brilliant" :) example in the cvs > >&gt...
2010 Sep 03
0
[LLVMdev] Why clang inlines with -O3 flag and opt doesn't?
On Fri, Sep 3, 2010 at 12:46 AM, Yuri <yuri at rawbw.com> wrote: > When I compile my C fibonacci example fib.c with 'clang -O3 -c -emit-llvm -o fib-clang.bc fib.c&&  llvm-dis fib-clang.bc' I get fib-clang.ll that has some degree of inlining in it. > > But when I get an equivalent to fib.c file fib.ll and run it through opt with the command 'llvm-as fib.ll&&a...
2014 May 08
3
[LLVMdev] Small problem with the tail call elimination pass
Hello everybody, On the documentation page for the tailcallelim pass you can read: "This pass transforms functions that are prevented from being tail recursive by an associative expression to use an accumulator variable, thus compiling the typical naive factorial or fib implementation into efficient code” However, I don’t see this behavior when trying to compile this variant of the mentioned “typical naive fib implementation”: unsigned int fib(unsigned int n) { return n < 2 ? n : fib(n-1) + fib(n-2); } The IR with clang -O3 (version 3.4) is this: define...
2010 Mar 24
3
mounting gfs partition hangs
Hi, I have configured two machines for testing gfs filesystems. They are attached to a iscsi device and centos versions are: CentOS release 5.4 (Final) Linux node1.fib.upc.es 2.6.18-164.el5 #1 SMP Thu Sep 3 03:33:56 EDT 2009 i686 i686 i386 GNU/Linux The problem is if I try to mount a gfs partition it hangs. [root at node2 ~]# cman_tool status Version: 6.2.0 Config Version: 29 Cluster Name: gfs-test Cluster Id: 25790 Cluster Member: Yes Cluster Generation: 4156...
2005 May 12
2
[LLVMdev] Scheme + LLVM JIT
...ssumptions that it will always be parsing from the file system. Would you guys accept a patch that makes it more general (ie, parse from file or string)? If so, what's an easy way to do it? Is it possible to have a "FILE" struct backed by a string? FYI, here is a sketch of what the fib example would look like: #include "llvm_c.h" /* Everything takes and recieves void * pointers. This to avoid redefining C++ types. This is the C 'version' of the Fib example, at least in spirit. */ char* fib_function = "int %fib (int %AnArg) {" " EntryB...
2018 Jan 30
5
[Bug 1220] New: Reverse path filtering using "fib" needs better documentation
https://bugzilla.netfilter.org/show_bug.cgi?id=1220 Bug ID: 1220 Summary: Reverse path filtering using "fib" needs better documentation Product: nftables Version: unspecified Hardware: All OS: All Status: NEW Severity: minor Priority: P5 Component: nft Assignee: pablo at netfilter.o...
2010 Mar 03
1
[LLVMdev] llvm hangs: fibonacci numbers, recursive
Having tried out llvm I had to notice that the fibonacci example program hangs after short: > ./run fib 1 1 2 3 5 8 ^C For the next number it would be supposed to last twice as long as for 8. However it hangs forever instead. using llvm-2.5-0.pm.1.1.x86_64 Does not matter whether I compile it with gcc or interprete it with lli. ------------...
2015 Apr 23
2
[LLVMdev] Get precise line/column debug info from LLVM IR
...0 -emit-llvm` and looking for the information in the metadata using this code: const DebugLoc &location = instruction->getDebugLoc(); // location.getLine() // location.getCol() Unfortunately, this information is absolutely imprecise. Consider the following implementation of the Fibonacci function: unsigned fib(unsigned n) { if (n < 2) return n; unsigned f = fib(n - 1) + fib(n - 2); return f; } I would like to locate the single LLVM instruction corresponding to the assignment `unsigned f = ...` in the resulting LLVM IR. I am no...
2004 Aug 13
3
[LLVMdev] is this code really JITed and/or optimized ? ..
Hi all, (thanks to Reid, who gave nice advice) the fibonacci function code works now. Please find attached file. but... the performance is adequate, say, for byte-code interpretation mode and not for optimized JITing. fibonacci function of 35 from attached file is more then 100 times slower then the following code compiled with "gcc -O2"...
2020 Sep 04
2
Performance of JIT execution
Hello, I recently noticed a performance issue of JIT execution vs native code of the following simple logic which computes the Fibonacci sequence: uint64_t fib(int n) { if (n <= 2) { return 1; } else { return fib(n-1) + fib(n-2); } } When compiled natively using clang++ with -O3, it took 0.17s to compute fib(40). However, when executing using LLJIT, fed with the IR output of "clang++ -emit-llvm -O3", it took 0.2...
2007 Nov 25
2
[LLVMdev] Fibonacci example in OCaml
Here's my translation of the Fibonacci example into OCaml: open Printf open Llvm let build_fib m = let fibf = define_function "fib" (function_type i32_type [| i32_type |]) m in let bb = builder_at_end (entry_block fibf) in let one = const_int i32_type 1 and two = const_int i32_type 2 in let argx = p...
2013 Jan 21
0
lambda.r 1.1.0 on CRAN
...ching in function definitions . An intuitive type system . Optional strong typing via type constraints . Type variables . Cleaner syntax for attributes Using these techniques, systems can be written more efficiently and with less headache. Here is a brief example of what you can do with lambda.r. fib(n) %::% numeric : numeric fib(n) %when% { n < 0 } %as% { stop("Negative numbers not allowed") } fib(0) %as% 1 fib(1) %as% 1 fib(n) %as% { fib(n-1) + fib(n-2) } > fib(-1) Error in function (n) : Negative numbers not allowed > fib(5) [1] 8 Documentation is available at the follo...