Integral of the integral using NIntegrate

You may try to restrict the definition of the integrand to avoid symbolic calculation. Like:


f[y_?NumericQ] := Exp[-NIntegrate[x, {x, 0, y}]];
NIntegrate[f[y], {y, 0, 2.8}]

Here's a refinement of bbgodfrey's approach, where I combine both integrals into a single NDSolveValue call:

sol = NDSolveValue[
    {
    z'[x] == x, z[0]==0,
    int'[x] == Exp[-z[x]], int[0]==0
    },
    int,
    {x, 0, 2.8}
];
sol[2.8] //AbsoluteTiming

{7.*10^-6, 1.24691}

The nice thing about this approach is that computing the integral for various y limits is quick. Compare this timing to that of the other numerically based answers:

f[y_?NumericQ] := Exp[-NIntegrate[x, {x, 0, y}]];
NIntegrate[f[y], {y, 0, 2.8}] //AbsoluteTiming

{0.072347, 1.24691}

NDSolveValue[{z'[x] == x, z[0] == 0}, z[x], {x, 0, 2.8}];
NIntegrate[Exp[-%], {x, 0, 2.8}] //AbsoluteTiming

{0.026102, 1.24691}


A typically more efficient approach for complicated integrands is

NDSolveValue[{z'[x] == x, z[0] == 0}, z[x], {x, 0, 2.8}];
NIntegrate[Exp[-%], {x, 0, 2.8}]
(* 1.24691 *)

The inner integration is performed only once here.