What is the best way to profile javascript execution?

Firebug Firebug provides a highly detailed profiling report. It will tell you how long each method invocation takes in a giant (detailed) table. You need to call console.profileEnd () to end your profile block. See the console API here: http://getfirebug.com/wiki/index.php/Console_API Blackbird Blackbird (official site) also has a simpler profiler (can be downloaded from here)

What is the difference between set and hashset in C++ STL?

hash_set is an extension that is not part of the C++ standard. Lookups should be O(1) rather than O(log n) for set, so it will be faster in most circumstances. Another difference will be seen when you iterate through the containers. set will deliver the contents in sorted order, while hash_set will be essentially random (Thanks Lou Franco). Edit: The C++11 … Read more

What is the difference between spark.sql.shuffle.partitions and spark.default.parallelism?

From the answer here, spark.sql.shuffle.partitions configures the number of partitions that are used when shuffling data for joins or aggregations. spark.default.parallelism is the default number of partitions in RDDs returned by transformations like join, reduceByKey, and parallelize when not set explicitly by the user. Note that spark.default.parallelism seems to only be working for raw RDD and is ignored when working with dataframes. If the task you are performing … Read more

Measure the time it takes to execute a t-sql query

One simplistic approach to measuring the “elapsed time” between events is to just grab the current date and time. In SQL Server Management Studio To calculate elapsed times, you could grab those date values into variables, and use the DATEDIFF function: That’s just one approach. You can also get elapsed times for queries using SQL … Read more