search for: memoiz

Displaying 20 results from an estimated 109 matches for "memoiz".

Did you mean: memoize
2012 Apr 26
2
Memoize and vectorize a custom function
My goal is simple: calcuate GC content of each sequence in a list of nucleotide sequences. I have figured out how to vectorize, but all my attempts at memoization failed. Can you show me how to properly memoize my function? There is a StackOverflow post on the subject of memoization, but it does not help me: http://stackoverflow.com/questions/7262485/options-for-caching-memoization-hashing-in-r I haven't been able to find any other discussions on...
2012 Feb 03
1
rails memoize and reload class => error raised
Hi, That''s a bit off topic but since I use Spork + Rspec... Well, my classes are reloaded between each test wave so Rails'' "memoize" method raises an error (which is expected, see code: http://rubydoc.info/docs/rails/3.0.0/ActiveSupport/Memoizable:memoize) Anyone resolved this issue with an elegant solution?
2016 May 12
0
[PATCH 4/4] lib: qemu: Memoize qemu feature detection.
qemu feature detection takes about 95ms on my laptop. The overhead is almost all due to the time taken by the glibc link loader opening the 170+ libraries that qemu is linked to (×2 because we need to run qemu twice). Fixing that is seriously hard work. Therefore memoize the results of guestfs_int_test_qemu. This is keyed on the size and mtime of the qemu binary, so if the user changes the qemu binary (eg. setting LIBGUESTFS_HV) we discard the memoized result and rerun the qemu commands. There is also a generation number so we can bump the generation in future v...
2010 Sep 23
1
[patch] Properly memoize protected methods
This patch fixes an issue with protected methods becoming public if they are memoized. Looking for +1''s and/or a commit by core... https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/5695 Thanks. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to ruby...
2012 Feb 09
0
memoize and invalidation - backwards?
Maybe this is because I''m missing something but it seems to me that asking users of a memoized method to know when the method needs to be reloaded is a bit backwards. To me it seems like whoever is messing with something that affects the results of the memoized function should be the one that after doing its work should call something like memoized_method(:reset). Thoughts? -- You receiv...
2010 Aug 25
2
Why freeze memoization?
I was wondering what was the reasoning behind freezing the Memoizable return values? Thanks -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to ruby...
2009 Jan 20
5
Problem running rake test
...pack-2.2.2/lib/ action_view/template_handlers/erb.rb:51:in `compile'' from C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ action_view/template_handler.rb:11:in `call'' from C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/ action_view/renderable.rb:21:in `_unmemoized_compiled_source'' from C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/ active_support/memoizable.rb:57:in `compiled_source'' from C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/ active_support/memoizable.rb:25:in `__send__'' ... 24...
2011 Nov 03
1
Call function only when running via R CMD check?
...9;R CMD check'. Is there a mechanism in 'R CMD check' that makes this possible? If not, is there a way to detect that you are running via 'R CMD check', e.g. an R or an environment variable being set? The background for this is that some of my packages' examples are using memoization to cache computational expensive results (via the 'R.cache' package). These are cached to files which are by default stored under ~/.Rcache/. It turns out that these files live beyond the check cycle of the CRAN check servers, meaning that the next time the package is checked memoiz...
2018 Oct 04
2
Re: [PATCH v2] lib: Use qemu-img info -U option to avoid locking error.
On Wed, Sep 26, 2018 at 06:36:47PM +0200, Pino Toscano wrote: > On Friday, 21 September 2018 11:53:52 CEST Richard W.M. Jones wrote: > > +/** > > + * Test if the qemu-img info command supports the C<-U> option to > > + * disable locking. The result is memoized in the handle. > > + * > > + * Note this option was added in qemu 2.11. We can remove this test > > + * when we can assume everyone is using qemu >= 2.11. > > + */ > > +static int > > +qemu_img_supports_U_option (guestfs_h *g) > > +{ > > + if (...
2013 Nov 03
3
[LLVMdev] freeing alloca'd variables before function exits
Hi, In my llvm code I want to create some function calls. The function prototype is as follows: int memoize ( char *function_name, int *int_params, unsigned num_ints, double *double_params, unsigned num_doubles) In order to create these calls I do the following for example: %88 = alloca [7 x i8] store volatile [7 x i8] c"ORACLE\00", [7 x i8]* %88 %89 =...
2012 Sep 15
2
Risk of readRDS() not detecting race conditions with parallel saveRDS()?
...remely unlikely (*) that they would generate a file that would pass as valid by readRDS()? (*) extremely unlikely = if all of us would run this toy example we would not end up with a non-detect but still corrupt "foo.rds" file in, say, 10000 years. Background: The R.cache package allows memoization (caching of results) to file such that the cache is persistent across R sessions. The persistent part is achieved by writing cache files to the same file directory. This is safe when you run a single process, and even if readRDS() would fail to read a cache file it is no big deal; the memoiza...
2015 Mar 12
1
[PATCH] generator: small optimization of pod2text cache memoization
Instead of save every time there's a new element in the cache, batch the saving to disk every 100 changes, saving the unsaved remainder at the exit. While not a big optimization, this reduces a bit the disk usage during generator run. --- generator/utils.ml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/generator/utils.ml b/generator/utils.ml index
2018 Sep 21
4
[PATCH v2] lib: Use qemu-img info -U option to avoid locking error.
...;); if (filename[0] == '/') @@ -218,3 +224,36 @@ set_child_rlimits (struct command *cmd) guestfs_int_cmd_set_child_rlimit (cmd, RLIMIT_CPU, 10 /* seconds */); #endif } + +/** + * Test if the qemu-img info command supports the C<-U> option to + * disable locking. The result is memoized in the handle. + * + * Note this option was added in qemu 2.11. We can remove this test + * when we can assume everyone is using qemu >= 2.11. + */ +static int +qemu_img_supports_U_option (guestfs_h *g) +{ + if (g->qemu_img_supports_U_option >= 0) + return g->qemu_img_supports_U_...
2010 Aug 11
2
[LLVMdev] LSR is Unbearably Slow
I just filed bug 7872 about non-scalability of the LSR analysis algorithms. It may be related to bug 6727. The fundamental problem appears to be re-running SCEV analyses such as properlyDominates and SCEVComplexityCompare over and over again on large SCEV expressions. Memoizing results for SCEVComplexityCompare appears to help significantly but that is much harder to do with things like properlyDominates. Is anyone actively looking at LSR compile time issues? LLVM 2.7 is taking on the order of 30 minutes to optimize some very simple test cases and that's after do...
2018 Oct 04
1
Re: [PATCH v2] lib: Use qemu-img info -U option to avoid locking error.
...at 06:36:47PM +0200, Pino Toscano wrote: > > > On Friday, 21 September 2018 11:53:52 CEST Richard W.M. Jones wrote: > > > > +/** > > > > + * Test if the qemu-img info command supports the C<-U> option to > > > > + * disable locking. The result is memoized in the handle. > > > > + * > > > > + * Note this option was added in qemu 2.11. We can remove this test > > > > + * when we can assume everyone is using qemu >= 2.11. > > > > + */ > > > > +static int > > > > +qemu_img_sup...
2003 Aug 02
7
[2.6] Perl weirdness with ext3 and HTREE
Hi I have mailed about this previously, but back then it was not really confirmed, so I have let it be at that. Anyhow, problem is that for some reason 2.5/2.6 ext3 with HTREE support do not like what perl-5.8.0 does during installation. It *seems* like one of the temporary files created during manpage installation do not get unlinked properly, or gets into the hash (this possible?) and cause
2013 Nov 04
0
[LLVMdev] freeing alloca'd variables before function exits
...rlap. But I don't think anyone has built a general solution for alloca'd space. On Mon, Nov 4, 2013 at 6:30 AM, Ali Javadi <aj14889 at yahoo.com> wrote: > Hi, > > In my llvm code I want to create some function calls. The function > prototype is as follows: > > int memoize ( char *function_name, > int *int_params, unsigned num_ints, > double *double_params, unsigned num_doubles) > > In order to create these calls I do the following for example: > > %88 = *alloca* [7 x i8] > store volatile [7 x i8] c"ORACLE...
2018 Sep 26
0
Re: [PATCH v2] lib: Use qemu-img info -U option to avoid locking error.
On Friday, 21 September 2018 11:53:52 CEST Richard W.M. Jones wrote: > +/** > + * Test if the qemu-img info command supports the C<-U> option to > + * disable locking. The result is memoized in the handle. > + * > + * Note this option was added in qemu 2.11. We can remove this test > + * when we can assume everyone is using qemu >= 2.11. > + */ > +static int > +qemu_img_supports_U_option (guestfs_h *g) > +{ > + if (g->qemu_img_supports_U_option >= 0...
2017 Sep 15
2
IVUsers pass is fragile. Is this okay? How can it be resolved?
...a user of %1’s SCEV in DFT (1). We don’t do the same in DFT (2) because we don’t visit the def of %5 in the same way. Instead, in DFT (2) the def of %1 ends up being the value that appears twice in a def-use chain. What I *think* would be proper for IVUsers is to have IVUsers::AddUserImpl() : A) Memoize its result for each given instruction instead of having the Processed.count(User) condition at lines 235 & 241. The presence of Processed.count(User) in the conditions at lines 235 & 241 basically has the effect of changing the return value of AddUsersImpl() for “interesting” instructions...
2018 Oct 04
0
Re: [PATCH v2] lib: Use qemu-img info -U option to avoid locking error.
...On Wed, Sep 26, 2018 at 06:36:47PM +0200, Pino Toscano wrote: > > On Friday, 21 September 2018 11:53:52 CEST Richard W.M. Jones wrote: > > > +/** > > > + * Test if the qemu-img info command supports the C<-U> option to > > > + * disable locking. The result is memoized in the handle. > > > + * > > > + * Note this option was added in qemu 2.11. We can remove this test > > > + * when we can assume everyone is using qemu >= 2.11. > > > + */ > > > +static int > > > +qemu_img_supports_U_option (guestfs_h *g)...