Displaying 20 results from an estimated 11000 matches similar to: "R-alpha: Sorting Efficiency"
2011 Sep 04
2
what is wrong with my quicksort?
Hey guys,
I tried to program quicksort like this but somethings wrong.
please help
>partition <- function(x, links, rechts){
>
> i <- links
> j <- rechts
> t <- 0
> pivot <- sample(x[i:j],1)
>
> while(i <= j){
>
> while(x[i] <= pivot){
> i = i+1}
>
> while(x[j] >= pivot){
> j = j-1}
>
> if( i
2023 Oct 16
1
Create new data frame with conditional sums
If one makes the reasonable assumption that Pct is much larger than
Cutoff, sorting Cutoff is the expensive part e.g O(nlog2(n) for
Quicksort (n = length Cutoff). I believe looping is O(n^2). Jeff's
approach using findInterval may be faster. Of course implementation
details matter.
-- Bert
On Mon, Oct 16, 2023 at 4:41?AM Leonard Mada <leo.mada at syonic.eu> wrote:
>
> Dear
2012 Oct 03
0
[LLVMdev] Does LLVM optimize recursive call?
> Only if the recursion is very deep. In practice, a recursive descent
> parser isn't going to run out of stack space, nor will a quicksort or
> binary-tree walker,
The recursive-descent parser case has happened in practice:
http://my.opera.com/hallvors/blog/2012/07/17/twitter-crashes-itself-with-commas?1
Also, I've seen some recursion-related PR's in Clang, although I think
1997 Sep 03
1
R-alpha: speed of sort(.) and order(.)
sort() and order() are not quite the same, as "one knows":
o order allows breaking ties by more than one argument;
o sort allows a 'partial' and 'na.last' argument
Still, the following timing (on a `simple' UltraSparc I)
suggest that actually two different algorithms are used
> N <- 10000
> typeof(x0 <- 1:N) # --- x0 : already sorted ---
[1]
2012 Oct 03
3
[LLVMdev] Does LLVM optimize recursive call?
On Wed, Oct 3, 2012 at 10:15 AM, Matthieu Moy
<Matthieu.Moy at grenoble-inp.fr> wrote:
> Preston Briggs <preston.briggs at gmail.com> writes:
>> Think about costs asymptotically; that's what matters. Calls and
>> returns require constant time, just like addition and multiplication.
>
> Constant time, but not necessarily constant memory.
>
> Deep recursion
2000 Mar 03
1
tapply, sorting and the heap
howdy gurus,
I'm new and green and I was hoping for a tiny bit of your expertise.
I'm running out of virtual memory (heap?) when summing using tapply. I've
already used --vsize=90M on my hpux machine. (details below)
Can I pre-sort or something to prevent my error?
thanks,
John Strumila
john.strumila at corpmail.telstra.com.au
> gc()["Vcells","total"]
[1]
2006 Mar 11
1
Quicker quantiles?
Motivated by Deepayan's recent inquiries about the efficiency of the
R 'quantile'
function:
http://tolstoy.newcastle.edu.au/R/devel/05/11/3305.html
http://tolstoy.newcastle.edu.au/R/devel/06/03/4358.html
I decided to try to revive an old project to implement a version of
the Floyd
and Rivest (1975) algorithm for finding quantiles with O(n)
comparisons. I
used
2002 Nov 04
0
uncertainty principle is untenable !!!
please reply to hdgbyi@public.guangzhou.gd.cn
or bgpgong@hotmail.com,
thank you.
UNCERTAINTY PRINCIPLE
IS
UNTENABLE
By reanalysing the experiment of Heisenberg Gamma-Ray Microscope and one of ideal experiment from which uncertainty principle is derived , it is found that actually uncertainty principle can not be obtained from these two ideal experiments . And it is found that
2002 Oct 16
0
uncertainty principle is untenable !!! (new)
please reply to hdgbyi@public.guangzhou.gd.cn
or bcpgong@hotmail.com,
thank you.
UNCERTAINTY PRINCIPLE
IS
UNTENABLE
By reanalysing the experiment of Heisenberg Gamma-Ray Microscope and one of ideal experiment from which uncertainty principle is derived , it is found that actually uncertainty principle can not be obtained from these two ideal experiments . And it is found that
2014 Jul 29
1
How to compile APUE code on centos 6.X
Hi all,
I want to compile the source code of Advanced Programming in the Unix
Environment(APUE) 3rd edition, and I encountered some difficulties.
After executing "make", I got this message:
gcc -ansi -I../include -Wall -DLINUX -D_GNU_SOURCE barrier.c -o barrier
-L../lib -lapue -pthread -lrt -lbsd
/tmp/cc0gG99O.o: In function `thr_fn':
barrier.c:(.text+0x6e): undefined reference to
2013 Jan 30
2
[LLVMdev] Edge Profiling
Hello.
I'm using these commands to compile the code below in order to collect
edge/blocks profiling:
clang -emit-llvm -c sort.c -o sort.bc
opt -insert-edge-profiling sort.bc -o sort_prof.bc
clang sort_prof.bc -lprofile_rt -L/llvms/lib -o sort_prof
then I run the program and display the profiling information using
llvm-prof sort_prof.bc, and the result is:
2018 Jan 14
0
How to use stack maps
Hi,
I implemented a garbage collector for a language I wrote in college using
the llvm gc statepoint infrastructure.
Information for statepoints:
https://llvm.org/docs/Statepoints.html
Example usage of parsing the llvm stackmap can be found at:
https://github.com/dotnet/llilc/blob/master/lib/GcInfo/GcInfo.cpp
https://llvm.org/docs/StackMaps.html#stackmap-format
2011 May 03
0
[LLVMdev] Greedy register allocation
Jakob Stoklund Olesen <stoklund at 2pi.dk> writes:
> +10.0% SingleSource/Benchmarks/CoyoteBench/huffbench
> +12.0% SingleSource/Benchmarks/McGill/chomp
> +18.0% SingleSource/Benchmarks/BenchmarkGame/n-body
> +45.5% SingleSource/Benchmarks/BenchmarkGame/puzzle
> +10.0% SingleSource/Benchmarks/Shootout/heapsort
> +10.5%
2016 Nov 15
9
Non-determinism in LLVM codegen
Everyone,
There is non-determinism in LLVM codegen in the following scenarios:
1. Between back-to-back runs of the same LLVM toolchain
2. Between Release vs Release+Asserts toolchains
3. Between Linux vs Windows toolchains
The main reasons for the non-determinism in codegen are:
1. Iteration of unordered containers (like SmallPtrSet, DenseMap, etc)
where the iteration order is undefined
2.
2003 Feb 25
2
R-devel problems
The OS X configure in R-devel has been changed to use two-level
namespaces. There
are still some problems.
1. Trunmed.c in the modreg packages defines a function heapsort(),
while heapsort
is also defined (differently) in /usr/lib/stdlib.h. I (temporarily)
disabled the
definition in stdlib.h.
2. If R is configured with the --without-x flag, then CPPFLAGS does not
include
/usr/X11R6/include,
2016 Nov 16
2
Non-determinism in LLVM codegen
> On 2016-Nov-15, at 15:16, Hal Finkel <hfinkel at anl.gov> wrote:
>
> ----- Original Message -----
>> From: "Mandeep Singh via llvm-dev Grang" <llvm-dev at lists.llvm.org>
>> To: llvm-dev at lists.llvm.org, "mehdi amini" <mehdi.amini at apple.com>, dexonsmith at apple.com, zinob at codeaurora.org
>> Sent: Tuesday, November 15, 2016
2010 Aug 27
3
Sorting groups in bwplot chart
Hi all,
I am just curious how to sort the groups in a categorical box plot chart
bwplot
here is the example:
d<-data.frame(sample(rep(month.abb,20), 100), runif(100,1,10));
colnames(d) <- c("Month", "Value");
bwplot(d$Month ~ d$Value);
as you can see Months are not sorted alphabetically. Does anybody know ho to
sort those on the chart level?
Thank you
Jan
2009 Apr 03
0
Alpha sorting on both options and groups for option_groups_from_collection_for_select
# How would you best perform a secondary sort on :buildings below?
= ''Building Name''
= select_tag ''building_id'', |
option_groups_from_collection_for_select(Site.all(:order => :full_name), |
:buildings, :full_name, :id, :full_name, nil) |
--
Thanks,
Tyler Arrigoni
President
OneInterface.net Network Engineering, Inc.
7475 North Palm, Suite 105, Fresno,
2010 May 24
1
avicap32.dll SmartTee filter status?
I see that one of the to-do's is to add a SmartTee filter to avicap32.dll.
I have a microscope camera that is based upon a webcam (that I cannot set the proper resolution under Linux- and haven't gotten help to do so). I have software and drivers that will work in VirtualBox, but there is a 5 second delay between moving a slide in the window and the move showing up in the software
2007 Aug 20
0
[LLVMdev] ocaml+llvm
On Aug 19, 2007, at 20:43, Chris Lattner wrote:
> On Aug 14, 2007, at 4:35 AM, Gordon Henriksen wrote:
>
>> On Aug 14, 2007, at 06:24, Gordon Henriksen wrote:
>>
>>> The two major problems I had really boil down to identifying GC
>>> points in machine code and statically identifying live roots at
>>> those GC points, both problems common to many