Skip to content

Instantly share code, notes, and snippets.

View colinrgodsey's full-sized avatar

Colin Godsey colinrgodsey

View GitHub Profile
@colinrgodsey
colinrgodsey / gist:9bc606d09d035ba2334c
Last active August 29, 2015 14:17
ByteBuffer direct vs wrapped performance (Java 8 OSX)
/**
RESULTS:
[info] - A direct ByteBuffer (with copy) should be faster than a wrapped buffer (14 seconds, 281 milliseconds)
[info] + failed samples: 0, nSamples: 40000, testBufferSize: 4096, batchNum: 50
[info] + 99.0% direct: 12.76µs (n 2) wrapped: 12.94µs (n 6)
[info] + 98.0% direct: 11.12µs (n 12) wrapped: 11.36µs (n 12)
[info] + 80.0% direct: 6.92µs (n 86) wrapped: 7.1µs (n 66)
[info] + 70.0% direct: 6.02µs (n 134) wrapped: 6.22µs (n 107)
[info] + 50.0% direct: 5.36µs (n 370) wrapped: 5.54µs (n 406)
[info] + 30.0% direct: 5.02µs (n 735) wrapped: 5.16µs (n 635)
@colinrgodsey
colinrgodsey / gist:b3e02602c5f113244cb3
Last active August 29, 2015 14:18
'mean' optimized JS
function ob(a) {
for (var b = pb(a), c = 0; b.fa < b.M.oa;) {
H();
var d = b.la;
if (d)
if ("number" !== typeof d) var d = y(d),
e = z().g,
d = null === d ? null === e : d.q(e);
else d = !1;
else d = !0;
$c_Lorg_HdrHistogram_LongHistogram.prototype.mean__D = (function() {
var itr = new $c_Lorg_HdrHistogram_LongHistogram$Iterator().init___Lorg_HdrHistogram_LongHistogram(
this);
var total = 0;
while ((itr.org$HdrHistogram$LongHistogram$Iterator$$bucketIndex$2 <
itr.org$HdrHistogram$LongHistogram$Iterator$$histogram$f
.bucketCount$1)) {
$m_Lorg_HdrHistogram_Histogram$();
var $$this = itr.org$HdrHistogram$LongHistogram$Iterator$$$undcountAtIndex$2;
if ((!(!(!$$this)))) {
* FQI20N06 60V N-CHANNEL DMOSFET ELECTRICAL PARAMETERS
*------------------------------------------------------------------------------------
.SUBCKT FQI20N06 20 10 30
Rg 10 1 1
M1 2 1 3 3 DMOS L=1u W=1u
.MODEL DMOS NMOS (VTO={3.78*{-0.00078*TEMP+1.0195}} KP={14.5*{-0.00077*TEMP+1.01925}}
+ THETA=0.056 VMAX=7.8E4 LEVEL=3)
Cgs 1 3 425p
Rd 20 4 17.5m TC=0.0087
Dds 3 4 DDS
[11:37:11] [main/INFO] [Sponge]: /*************************************************************************************************************************************************************************************/
[11:37:11] [main/INFO] [Sponge]: /* */
[11:37:11] [main/INFO] [Sponge]: /* Oh dear. Sponge could not apply one or more patches. A required class was loaded prematurely! */
[11:37:11] [main/INFO] [Sponge]: /* */
[11:37:11] [main/INFO] [Sponge]: /*-------------------------------------------------------------------------------------------------------------------------