TurboFan 解码器 v8-native-prototype

码农软件 · 软件分类 · 常用工具包 · 2019-08-17 15:29:17

软件介绍

v8-native-prototype 是用于 TurboFan 的原型本地解码器。

示例代码:

void TestWasmDecodingSpeed() {
  byte code[] = {kStmtSetLocal, 0, kExprInt32Add, kExprGetLocal, 0,
                 kExprInt8Const, 5};
  Zone zone;
  LR_WasmDecoder decoder(&zone, nullptr);
  FunctionSig::Builder builder(&zone, 1, 1);
  builder.AddReturn(kAstInt32);
  builder.AddParam(kAstInt32);
  FunctionEnv env = {nullptr, builder.Build(), 0, 0, 0, 0};
  // Make COUNT copies of the above code.
  const int TRIALS = 10;
  const int COUNT = (4 * 1024) / sizeof(code);
  const int TOTAL = COUNT * sizeof(code);
  byte* big_code = reinterpret_cast<byte*>(zone.New(TOTAL));
  for (int i = 0; i < COUNT; i++) {
    memcpy(big_code + i * sizeof(code), code, sizeof(code));
  }
  for (int i = 0; i < TRIALS; i++) {
    base::ElapsedTimer timer;
    timer.Start();
    Result result = decoder.Decode(&env, big_code, big_code + TOTAL);
    int64_t us = timer.Elapsed().InMicroseconds();
    OFStream os(stdout);
    double rate = ((TOTAL * 1000000.0) / us) / 1048576;
    os << result << TOTAL << " bytes, us: " << us << " (" << rate << " MB/sec)"
       << std::endl;
  }
}

本文地址:https://codercto.com/soft/d/12570.html

这才是马云

这才是马云

陈伟 / 浙江人民出版社 / 2011-5 / 30.00元

“幽默马云”、“开心马云”、“顽皮马云”、“狂妄马云”等。《这才是马云》从各个角度揭开了千面马云的真面目,告诉你一个与想象中大不一样的马云。这不只是一本书,更像一部喜剧电影,让你通过声音、色彩、表情等诸多要素走近马云,感受阿里巴巴。没有冗长的说教,只有让人忍俊不禁的细节;没有高深的理论,只有通俗、诚恳的陈述。作者借幽默平常的琐事,记录下马云“可爱”的一面,看完后让人恍然大悟:原来,马云是这样一个人......一起来看看 《这才是马云》 这本书的介绍吧!

JS 压缩/解压工具
JS 压缩/解压工具

在线压缩/解压 JS 代码

在线进制转换器
在线进制转换器

各进制数互转换器

正则表达式在线测试
正则表达式在线测试

正则表达式在线测试