Git Product home page Git Product logo

fibonacci's Introduction

フィボナッチ数列の計算

今回覚えたtips

処理時間の計測

$ time node app.js

...
処理結果出力
...

real    0m1.095s
user    0m0.233s
sys     0m0.068s

プロファイルツールを使う

$ node --prof app.js

...
処理結果出力
...

$ ls
README.md  app.js  isolate-0x2fbfe20-v8.log

$ node --prof-process isolate-0x2fbfe20-v8.log > out.log
$ less out.log

...
 [Summary]:
   ticks  total  nonlib   name
      9    0.8%    0.8%  JavaScript
   1110   98.6%   99.1%  C++
     13    1.2%    1.2%  GC
      6    0.5%          Shared libraries
      1    0.1%          Unaccounted
...

 [Bottom up (heavy) profile]:
  Note: percentage shows a share of a particular caller in the total
  amount of its parent calls.
  Callers occupying less than 1.0% are not shown.

   ticks parent  name
    473   42.0%  __write
    108   22.8%    v8::internal::Runtime_InterpreterDeserializeLazy(int, v8::internal::Object**, v8::internal::Isolate*)
     15   13.9%      Script: ~<anonymous> buffer.js:1:11
     15  100.0%        LazyCompile: ~NativeModule.compile internal/bootstrap/loaders.js:234:44
     15  100.0%          LazyCompile: ~NativeModule.require internal/bootstrap/loaders.js:138:34
...

[Summary] に、処理全体の概要が表示される

[Bottom up (heavy) profile] に、時間のかかった処理が表示される

fibonacci's People

Contributors

ddragon avatar g3-hobbit avatar soichiro-yoshimura avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.