File tree Expand file tree Collapse file tree
benchmark/0011.containers/deque/0004.push_front
include/fast_io_dsal/impl
tests/0026.container/0003.deque Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ #include < fast_io.h>
2+ #include < fast_io_driver/timer.h>
3+ #include < fast_io_dsal/deque.h>
4+
5+ int main ()
6+ {
7+ fast_io::timer tm (u8" fast_io::deque" );
8+ fast_io::deque<std::size_t > deq;
9+ constexpr std::size_t n{100000000 };
10+ {
11+ fast_io::timer tm1 (u8" push_front" );
12+ for (std::size_t i{}; i != n; ++i)
13+ {
14+ deq.push_front (i);
15+ }
16+ }
17+ ::std::size_t sum{};
18+ {
19+ fast_io::timer tm1 (u8" loop" );
20+ for (auto const e : deq)
21+ {
22+ sum += e;
23+ }
24+ }
25+ ::fast_io::io::perrln (" sum=" ,sum);
26+ }
Original file line number Diff line number Diff line change 1+ #include < fast_io.h>
2+ #include < fast_io_driver/timer.h>
3+ #include < deque>
4+
5+ int main ()
6+ {
7+ fast_io::timer tm (u8" std::deque" );
8+ std::deque<std::size_t > deq;
9+ constexpr std::size_t n{100000000 };
10+ {
11+ fast_io::timer tm1 (u8" push_front" );
12+ for (std::size_t i{}; i != n; ++i)
13+ {
14+ deq.push_front (i);
15+ }
16+ }
17+ ::std::size_t sum{};
18+ {
19+ fast_io::timer tm1 (u8" loop" );
20+ for (auto const e : deq)
21+ {
22+ sum += e;
23+ }
24+ }
25+ ::fast_io::io::perrln (" sum=" ,sum);
26+ }
You can’t perform that action at this time.
0 commit comments