From 1ffbd8b18c8790e87efd2fbdcfba30f63e5a1e2d Mon Sep 17 00:00:00 2001 From: vd89 Date: Sun, 14 Aug 2022 18:45:45 +0530 Subject: [PATCH] week_3: with different conditions --- Week-3/exercise_3.1/index.js | 37 ++++++++++++++++++++++++++++++++---- 1 file changed, 33 insertions(+), 4 deletions(-) diff --git a/Week-3/exercise_3.1/index.js b/Week-3/exercise_3.1/index.js index 2b820c2..7cb3c36 100644 --- a/Week-3/exercise_3.1/index.js +++ b/Week-3/exercise_3.1/index.js @@ -37,10 +37,39 @@ timeEnd("process_4"); /* Function called for Operation 300 Printing Cache Map(1) { '100,200' => 300 } -process_1: 5.239ms +process_1: 4.671ms Function called for Operation 200 Printing Cache Map(2) { '100,200' => 300, '100,100' => 200 } -process_2: 0.304ms -process_3: 0.015ms -process_4: 0.008ms +process_2: 0.244ms +process_3: 0.007ms +process_4: 0.013ms +*/ + +time("process_1"); +memorizeAdd(200,100); +timeEnd("process_1"); +time("process_2"); +memorizeAdd(100,100); +timeEnd("process_2"); +time("process_3"); +memorizeAdd(100,100); +timeEnd("process_3"); +time("process_4"); +memorizeAdd(200,100); +timeEnd("process_4"); +time("process_5"); +memorizeAdd(200,100); +timeEnd("process_5"); + + +/* +Function called for Operation 300 +Printing Cache Map(1) { '200,100' => 300 } +process_1: 4.955ms +Function called for Operation 200 +Printing Cache Map(2) { '200,100' => 300, '100,100' => 200 } +process_2: 0.351ms +process_3: 0.008ms +process_4: 0.007ms +process_5: 0.01ms */ \ No newline at end of file