#[macro_use] extern crate bencher; extern crate bdb; use bencher::{black_box, Bencher}; use bdb::db::uniprot::*; use bdb::traits::*; // BENCHES fn to_xml(bench: &mut Bencher) { let gapdh = Record { sequence_version: 3, protein_evidence: ProteinEvidence::ProteinLevel, mass: 35780, length: 333, gene: String::from("GAPDH"), id: String::from("P46406"), mnemonic: String::from("G3P_RABIT"), name: String::from("Glyceraldehyde-3-phosphate dehydrogenase"), organism: String::from("Oryctolagus cuniculus"), proteome: String::from("UP000001811"), sequence: b"MVKVGVNGFGRIGRLVTRAAFNSGKVDVVAINDPFIDLHYMVYMFQYDSTHGKFHGTVKAENGKLVINGKAITIFQERDPANIKWGDAGAEYVVESTGVFTTMEKAGAHLKGGAKRVIISAPSADAPMFVMGVNHEKYDNSLKIVSNASCTTNCLAPLAKVIHDHFGIVEGLMTTVHAITATQKTVDGPSGKLWRDGRGAAQNIIPASTGAAKAVGKVIPELNGKLTGMAFRVPTPNVSVVDLTCRLEKAAKYDDIKKVVKQASEGPLKGILGYTEDQVVSCDFNSATHSSTFDAGAGIALNDHFVKLISWYDNEFGYSNRVVDLMVHMASKE".to_vec(), taxonomy: String::from("9986"), reviewed: true, }; bench.iter(|| { black_box(gapdh.to_xml_string()) }) } fn from_xml(bench: &mut Bencher) { let text = "\n\n\nP46406\nQ4AC92\nG3P_RABIT\n\n\nGlyceraldehyde-3-phosphate dehydrogenase\nGAPDH\n1.2.1.12\n\n\nPeptidyl-cysteine S-nitrosylase GAPDH\n2.6.99.-\n\n\n\nGAPDH\nGAPD\n\n\nOryctolagus cuniculus\nRabbit\n\n\nEukaryota\nMetazoa\nChordata\nCraniata\nVertebrata\nEuteleostomi\nMammalia\nEutheria\nEuarchontoglires\nGlires\nLagomorpha\nLeporidae\nOryctolagus\n\n\n\n\nSequence of the rabbit glyceraldehyde-3-phosphate dehydrogenase-encoding cDNA.\n\n\n\n\n\n\n\n\n\n\n\nNUCLEOTIDE SEQUENCE [MRNA]\n\nSpleen\n\n\n\n\nA new troponin T and cDNA clones for 13 different muscle proteins, found by shotgun sequencing.\n\n\n\n\n\n\n\n\nNUCLEOTIDE SEQUENCE [MRNA] OF 33-79\n\n\n\nLimbal epithelial side-population cells have stem cell-like properties, including quiescent state.\n\n\n\n\n\n\n\n\n\n\n\nNUCLEOTIDE SEQUENCE [MRNA] OF 107-267\n\n\n\nStructure of rabbit-muscle glyceraldehyde-3-phosphate dehydrogenase.\n\n\n\n\n\n\n\n\n\n\nX-RAY CRYSTALLOGRAPHY (2.4 ANGSTROMS) IN COMPLEX WITH NAD\nSUBUNIT\n\n\nHas both glyceraldehyde-3-phosphate dehydrogenase and nitrosylase activities, thereby playing a role in glycolysis and nuclear functions, respectively. Glyceraldehyde-3-phosphate dehydrogenase is a key enzyme in glycolysis that catalyzes the first step of the pathway by converting D-glyceraldehyde 3-phosphate (G3P) into 3-phospho-D-glyceroyl phosphate. Modulates the organization and assembly of the cytoskeleton. Facilitates the CHP1-dependent microtubule and membrane associations through its ability to stimulate the binding of CHP1 to microtubules. Also participates in nuclear events including transcription, RNA transport, DNA replication and apoptosis. Nuclear functions are probably due to the nitrosylase activity that mediates cysteine S-nitrosylation of nuclear target proteins such as SIRT1, HDAC2 and PRKDC. Component of the GAIT (gamma interferon-activated inhibitor of translation) complex which mediates interferon-gamma-induced transcript-selective translation inhibition in inflammation processes. Upon interferon-gamma treatment assembles into the GAIT complex which binds to stem loop-containing GAIT elements in the 3\'-UTR of diverse inflammatory mRNAs (such as ceruplasmin) and suppresses their translation (By similarity).\n\n\nD-glyceraldehyde 3-phosphate + phosphate + NAD(+) = 3-phospho-D-glyceroyl phosphate + NADH.\n\n\nCarbohydrate degradation; glycolysis; pyruvate from D-glyceraldehyde 3-phosphate: step 1/5.\n\n\nHomotetramer. Interacts with EIF1AD, USP25, PRKCI and WARS. Interacts with TPPP; the interaction is direct. Interacts (when S-nitrosylated) with SIAH1; leading to nuclear translocation. Interacts with RILPL1/GOSPEL, leading to prevent the interaction between GAPDH and SIAH1 and prevent nuclear translocation. Interacts with CHP1; the interaction increases the binding of CHP1 with microtubules. Associates with microtubules. Interacts with phosphorylated RPL13A (By similarity). Component of the GAIT complex. Interacts with FKBP6; leading to inhibit GAPDH catalytic activity (By similarity).\n\n\n\n\nP61023\n\n\ntrue\n2\n\n\n\nCytoplasm\nCytosol\n\n\nNucleus\n\n\nCytoplasm\nCytoskeleton\n\nTranslocates to the nucleus following S-nitrosylation and interaction with SIAH1, which contains a nuclear localization signal.\n\n\nThe [IL]-x-C-x-x-[DE] motif is a proposed target motif for cysteine S-nitrosylation mediated by the iNOS-S100A8/A9 transnitrosylase complex.\n\n\nISGylated.\n\n\nS-nitrosylation of Cys-150 leads to interaction with SIAH1, followed by translocation to the nucleus. S-nitrosylation of Cys-245 is induced by interferon-gamma and LDL(ox) implicating the iNOS-S100A8/9 transnitrosylase complex and seems to prevent interaction with phosphorylated RPL13A and to interfere with GAIT complex activity (By similarity).\n\n\nSulfhydration at Cys-150 increases catalytic activity.\n\n\nOxidative stress can promote the formation of high molecular weight disulfide-linked GAPDH aggregates, through a process called nucleocytoplasmic coagulation.\n\n\nBelongs to the glyceraldehyde-3-phosphate dehydrogenase family.\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n3D-structure\nAcetylation\nADP-ribosylation\nApoptosis\nComplete proteome\nCytoplasm\nCytoskeleton\nGlycolysis\nIsopeptide bond\nMethylation\nNAD\nNucleus\nOxidoreductase\nPhosphoprotein\nReference proteome\nS-nitrosylation\nTransferase\nTranslation regulation\nUbl conjugation\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nMVKVGVNGFGRIGRLVTRAAFNSGKVDVVAINDPFIDLHYMVYMFQYDSTHGKFHGTVKA\nENGKLVINGKAITIFQERDPANIKWGDAGAEYVVESTGVFTTMEKAGAHLKGGAKRVIIS\nAPSADAPMFVMGVNHEKYDNSLKIVSNASCTTNCLAPLAKVIHDHFGIVEGLMTTVHAIT\nATQKTVDGPSGKLWRDGRGAAQNIIPASTGAAKAVGKVIPELNGKLTGMAFRVPTPNVSV\nVDLTCRLEKAAKYDDIKKVVKQASEGPLKGILGYTEDQVVSCDFNSATHSSTFDAGAGIA\nLNDHFVKLISWYDNEFGYSNRVVDLMVHMASKE\n\n\n\nCopyrighted by the UniProt Consortium, see https://www.uniprot.org/terms\nDistributed under the Creative Commons Attribution (CC BY 4.0) License\n\n\n"; bench.iter(|| { black_box(Record::from_xml_string(text)) }) } benchmark_group!( benches, to_xml, from_xml ); benchmark_main!(benches);