Pages

Wednesday, December 30, 2020

Speed test of various dart outputs

Recently, I was playing around with dart and got to know that it supports output of various types. So curiosity arises that which one would be fastest.

So to find out that I used basic hello-world sample

After that, I wrote the bash script


Test Result

On execution of this shell script, I got this

% sh build.sh


Raw

Hello, World!


real 0m0.285s

user 0m0.283s

sys 0m0.077s


Snapshot

Hello, World!


real 0m0.119s

user 0m0.138s

sys 0m0.027s


Executable

Generated: /.../test.exe

Hello, World!


real 0m0.118s

user 0m0.007s

sys 0m0.014s


Aot

Generated: /.../test.aot

Hello, World!


real 0m0.019s

user 0m0.007s

sys 0m0.009s



Observation

Then accumulated these data to process it as a chart that shows the speed test result


Here, 
  • Raw refers to the raw source-code
  • Snapshot refers to the platform independent intermediary code
  • Executable refers to the platform dependent native executable file
  • Aot refers to the AOT file for VM

Conclusion 

The speed in descending order would be like this,

AOT > Executable > Snapshot > Raw

So the execution speed of AOT is fastest whereas Raw is slowest.

Friday, December 18, 2020

Instead of using very + another word, find single word

Instead of using, very + another word, you can always find a single word that's more precise, descriptive and elegant.

For example,  excellent = very good

List of A to Z words with 'very' and equivalents


  • very able = proficient
  • very boring = tedious
  • very confused = baffled
  • very dirty = filthy
  • very easy = effortless
  • very funny = hilarious
  • very glad = overjoyed
  • very happy = ecstatic
  • very interesting = fascinating
  • very joyful = exuberant
  • very kind = compassionate
  • very large = huge
  • very mad = demented
  • very nasty = obnoxious
  • very old = ancient
  • very painful = excruciating
  • very quite = hushed
  • very rude = boorish
  • very shy = timid
  • very tired = exhausted
  • very ugly = hideous
  • very vicious = malicious
  • very wicked = evil
  • very xenophobic = jingoistic
  • very young = juvenile
  • very zen = meditative

Tuesday, January 21, 2020

Solved mission critical problem using reverse engineering

Here I'm sharing an incident that happened in 2017, when I had managed to solve a mission critical problem using reverse engineering and what I have learnt from it.

The incident was when I have been allocated a migration task. My whole project was migrated to webpack from system.js due to which integration build generator broke. So I got this task to migrate that integration build generator too and make it compatible to webpack within a week. I knew that I got this after another colleague failed to complete it in previous sprint. So there was a higher chance of missing the deadline because half of the time was already got consumed by previous colleague. I got this issue when it was about to be escalated in case I fail.

I thought if I'll go by the same path as my colleague then I may get the same result that he got. So I changed my strategy and look into the problem by reverse engineering it. Well, doing that gave me enough hints to solve the problem and fix the generator by having minimal impact. So after doing further analysis, I'd managed to fix the issue in 40% less time than was initially expected.

From this incident I learnt that sometimes it's good to see the problem from reverse angle instead of just front view.