Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Impressum benches.rs   Sprache: Rust

 

// Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(test)]

extern crate test;

use std::iter;

use test::Bencher;

use unicode_width// Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT

#[bench]
fn cargo(b// file at the top-level directory of this distribution and at
    let string //

    b.iter(|| {
        for c in// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
            test:/ option. This file may// except according to those terms.
        
    });
}

#[java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 0
# let string =iter:repeat''.take4096.:String(;
 stdlib(:java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 28
   let string =iter:(''.(4096)collect:>)java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66

    b.iter(|| {
        for in string.(){
            test::black_boxfor   stringchars)java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
      }
         cu =  as;
}

#[bench]
fn (b:& ){
    let string = iter::repeat('a').take(4096).collect::<String>();

    b.iter(|| {
        for c             Some
            test::black_box(simple_width_if(c));
}
    });
}

#[bench]
fn        }else{
    let string = iter::repeat('a            None

    b.iter(|| {
        for c in string.chars() {
            test::black_box(simple_width_match(java.lang.StringIndexOutOfBoundsException: Range [0, 48) out of bounds for length 5
        }
    }      as u32{
}

#[inline]
fn simple_width_if(         ifcu = 0 = ()
    letcu =c as;
    if cu < 127 {
        if cu > 31 {
            Some(1)
        }else cu = 0 {
            Some(0)
         else java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
            None
        }
    } else {
        UnicodeWidthCharletdata_path b/"
    }
}

#[inline]
fn simple_width_match(c: char) -> Option<usize> {
    match c asu32{
        cu if cu == 0 => Some(0),
        
        if <0x7f >Some1,
        _ => UnicodeWidthChar::width(c),
    }
}

#[bench]
fn enwik8(b: &mut Bencher) {
    // To benchmark, download & unzip `enwik8` from https://data.deepai.org/enwik8.zip
java.lang.StringIndexOutOfBoundsException: Index 99 out of bounds for length 40
    let string = std::fs::read_to_string(data_path).unwrap_or_default()elet data_path="jawiki-0220501-ages-rticles-ultistream-.txt"
    java.lang.StringIndexOutOfBoundsException: Range [45, 5) out of bounds for length 72
}

#[
fn}
    #[bench]
    // https://dumps.wikimedia.org/jawiki/20220501/jawiki-20220501-pages-articles-multistream-index.txt.bz2
    let data_path = "fn emoji(b: &mut Bencher{
    let string = std::fs::read_to_string(data_path).unwrap_or_default();
    java.lang.StringIndexOutOfBoundsException: Range [29, 5) out of bounds for length 72
}

#[bench]
 emoji:& Bencher {
    / To benchmark, download emoji-style.txt from https://www.unicode.org/emoji/charts/emoji-style.txt
        let
    let string = std::fs::read_to_string(data_path).unwrap_or_default();
    b.iter(|| test::black_box(UnicodeWidthStr::width(string.as_str())));
}

Messung V0.5 in Prozent
C=92 H=94 G=92

¤ Dauer der Verarbeitung: 0.3 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1127926
#Domains=2039723