View Format-Json.ps1
# https://github.com/PowerShell/PowerShell/issues/2736 | |
# https://github.com/PowerShell/PowerShell/issues/8604 | |
function Format-Json([Parameter(Mandatory, ValueFromPipeline)]$json) { | |
if ($json -isnot [string]) { $json = $json | ConvertTo-Json -Depth 10; } | |
$indent = 0; | |
$lines = $json.Split("`n", [System.StringSplitOptions]::RemoveEmptyEntries); | |
for (($len = $lines.Length), ($i = 0); $i -lt $len; $i++) { |
View Benchmark.cs
using System; | |
using System.Collections.Generic; | |
using System.Text; | |
using System.Linq; | |
using System.Runtime.InteropServices; | |
namespace Benchmark { | |
public static class Extensions { | |
public static string ToStringReset(this StringBuilder sb) { |
View index.html
<html><head> | |
<meta name="GENERATOR" content="HWiNFO64 v6.28-4200"> | |
<style> | |
A { text-decoration: none } | |
A:hover { text-decoration: underline } | |
TD { font: 80% verdana, tahoma, ms sans serif, arial; color: #000000; vertical-align: text-center; text-align: left } | |
TD.dn { font: 70% verdana, tahoma, ms sans serif, arial; color: #000000; vertical-align: text-center } | |
TD.di { font: bold 80% verdana, tahoma, ms sans serif, arial; color: #000000; vertical-align: text-center } | |
TD.ds { font: bold 80% verdana, tahoma, ms sans serif, arial; color: #000080; vertical-align: text-center } | |
TD.dt { font: bold 110% verdana, tahoma, ms sans serif, arial; color: #000080; vertical-align: text-center } |
View index.html
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"/> | |
<title>Javascript Fastest way to check for String Type that is not empty #jsbench #jsperf</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script> | |
<script src="./suite.js"></script> | |
</head> | |
<body> | |
<h1>Open the console to view the results</h1> |
View index.html
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"/> | |
<title>Map vs Object</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script> | |
<script src="./suite.js"></script> | |
</head> | |
<body> | |
<h1>Open the console to view the results</h1> |
View index.html
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"/> | |
<title>Fast MD5 Hash</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script> | |
<script src="./suite.js"></script> | |
</head> | |
<body> | |
<h1>Open the console to view the results</h1> |
View index.html
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"/> | |
<title>Javascript Property Access Performance</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script> | |
<script src="./suite.js"></script> | |
</head> | |
<body> | |
<h1>Open the console to view the results</h1> |
View index.html
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"/> | |
<title>Fastest way to filter/compact array</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script> | |
<script src="./suite.js"></script> | |
</head> | |
<body> | |
<h1>Open the console to view the results</h1> |
View index.html
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"/> | |
<title>Object Shape: Effects of how Object Properties are defined with their backing fields and limiting Enumerability + lazy properties and private fields</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script> | |
<script src="./suite.js"></script> | |
</head> | |
<body> | |
<h1>Open the console to view the results</h1> |
NewerOlder