File: seq.rs

package info (click to toggle)
rust-value-bag 1.9.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 600 kB
  • sloc: makefile: 4
file content (22 lines) | stat: -rw-r--r-- 480 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#![cfg(feature = "seq")]
#![feature(test)]

extern crate test;

use value_bag::ValueBag;

#[cfg(feature = "serde1")]
#[bench]
fn serde1_to_seq_5(b: &mut test::Bencher) {
    let v = ValueBag::from_serde1(&[1.0, 2.0, 3.0, 4.0, 5.0]);

    b.iter(|| v.to_f64_seq::<Vec<Option<f64>>>())
}

#[cfg(feature = "sval2")]
#[bench]
fn sval2_to_seq_5(b: &mut test::Bencher) {
    let v = ValueBag::from_sval2(&[1.0, 2.0, 3.0, 4.0, 5.0]);

    b.iter(|| v.to_f64_seq::<Vec<Option<f64>>>())
}