Displaying 3 results from an estimated 3 matches for "idxs2".
Did you mean:
idx2
2008 Jul 11
1
Suggestion: 20% speed up of which() with two-character mod
...lt;- base::which;
environment(which1) <- globalenv(); # Needed?
N <- 1e6;
set.seed(0xbeef);
x <- sample(c(TRUE, FALSE), size=N, replace=TRUE);
names(x) <- seq_along(x);
B <- 10;
t1 <- system.time({ for (bb in 1:B) idxs1 <- which1(x); });
t2 <- system.time({ for (bb in 1:B) idxs2 <- which2(x); });
stopifnot(identical(idxs1, idxs2));
print(t1/t2);
# Fair benchmarking
t2 <- system.time({ for (bb in 1:B) idxs2 <- which2(x); });
t1 <- system.time({ for (bb in 1:B) idxs1 <- which1(x); });
print(t1/t2);
## user system elapsed
## 1.283186 1.052632 1....
2008 Jul 03
0
[LLVMdev] Plans considering first class structs and multiple return values
> For example, this:
>
> %t0 = insertvalue { i32, i32 } undef, i32 %a, 0
> %t1 = insertvalue { i32, i32 } %t0, i32 %b, 1
>
> creates the value with %a and %b as member values.
Is there anyway to do it using the C++ API? It seems I need an
instance of the aggregate type to pass into InsertValueInst::Create().
What is the API equivalent of "undef"?
Marc
On Wed,
2008 Jul 02
3
[LLVMdev] Plans considering first class structs and multiple return values
Hello,
The basic infrastructure is in place. You can create first-class
structs/arrays using sequences of insertvalue.
For example, this:
%t0 = insertvalue { i32, i32 } undef, i32 %a, 0
%t1 = insertvalue { i32, i32 } %t0, i32 %b, 1
creates the value with %a and %b as member values. Other ways to
produce aggregate values are loads, function arguments, function
return values, and literal