« first day (2489 days earlier)      last day (2457 days later) » 

10:00 PM
@mikeTheLiar I thought getting rid of the gf was the way to profit
 
I am using fetch to post a form and I keep getting double posts
fetch("/weather",
{
    method: "post",
    body: data
})
.then(function(res){console.log('res', res.status) })
 
are you double clicking on the button? :)
 
no :|
 
copy paste that code into your console. does it double post?
if not, then... that code isn't the problem.
 
10:04 PM
find out of that fetch is being called once or twice. i bet twice.
 
well express is registering it twice
var payload = {
    latitude: position.coords.latitude,
    longitude:position.coords.longitude
};

var data = new FormData();
data.append( "json", JSON.stringify( payload ) );
 
the network tab should indicate the same.
 
@BenFortune ha, you know the foam sponge ones? For one of my class' senior pranks, somebody put them in most of the sinks and toilets. Janitors weren't even mad because it was just spongest.
 
network indicates two posts
 
@Loktar my roommate got a printer yesterday. So far we have a stormtrooper helmet and some 1" high t-rexes.
 
10:07 PM
var objects = [
    function (){ this.x = 1; },
    function (){ this["x"] = 1; },
    function (){ this[0] = 1; },
    function (){ this["0"] = 1; },
], I = 100000000;

for (var i = objects.length; i--;) {
    console.time(i);
    for (var j = I; j--;) new objects[i];
    console.timeEnd(i);
}
>> 3: 26002.080078125ms
>> 2: 28007ms
>> 1: 2805ms
>> 0: 2714ms
 
your problem likely lies with the code that is calling that fetch().
 
@MadaraUchiha
 
var objects = [
    function (){ this.x = 1; },
    function (){ this.x = 1; },
    function (){ this.x = 1; },
    function (){ this.x = 1; },
], I = 100000000;

for (var i = objects.length; i--;) {
    console.time(i);
    for (var j = I; j--;) new objects[i];
    console.timeEnd(i);
}
VM1642:11 3: 373ms
VM1642:11 2: 3571ms
VM1642:11 1: 3727ms
VM1642:11 0: 3598.000244140625ms
@Tobiq
 
??
 
10:08 PM
that benchmark is almost entirely meaningless
for so many reasons
 
broad statements
 
@Tobiq Your results are within margin of error.
 
You're not warming up the VM at all.
 
28 seconds is not within margin of error to 2 seconds.
maybe you didnt read the extra digit
 
I hate it when @Luggage is right, god dam it!! :) thx
 
10:10 PM
3: 15495.9248046875ms
2: 16092.390869140625ms
1: 1782.26904296875ms
0: 1660.40771484375ms
 
same thing whats your point
its 10x longer on both our computrrs
 
does it matter?
 
@KevinB ???
yes, because Im making a lot.
 
no point, just posting me numbers.
 
3: 11805.391ms
2: 11872.098ms
1: 1085.570ms
0: 1076.206ms

3: 412.797ms
2: 1107.650ms
1: 1082.646ms
0: 1059.793ms
one of those is your benchmark, one is Kevin's.
 
10:11 PM
kevin changed the flipping objects
ppl are not even reading
 
@MadaraUchiha Tobiq was a margin of error.
 
* Your results are within margin of error. *
 
we are reading
 
28 seconds, not 2.8 seconds
theyre very far apart
 
@ssube haha nice!
 
10:12 PM
why does the same code, run 4 times, yield such different results?
 
oh my god.
 
yeah man mines going to be heavily used for costumes
 
its not the same code
 
@Tobiq please read carefully. Kevin's benchmark uses the same function, 4 times.
 
if you read, as i requested, you would have seen that @KevinB CHANGED the objects.
 
10:13 PM
@Tobiq point is... if you run the same code 4 times, 10 million times each, and get a variance, you can't run 4 different tests one time each and have a conclusion.
 
Mine:
var objects = [
    function (){ this.x = 1; },
    function (){ this["x"] = 1; },
    function (){ this[0] = 1; },
    function (){ this["0"] = 1; },
], I = 100000000;
his:
var objects = [
    function (){ this.x = 1; },
    function (){ this.x = 1; },
    function (){ this.x = 1; },
    function (){ this.x = 1; },
], I = 100000000;
he purposely spoofed the test...
 
so why does his have such a large stddev?
 
i ran the same test 4 times
 
he spoofed the test to show why microbenchmarks aren't reliable
 
and got 4 different results
 
10:14 PM
yes i know what margin of error is.
 
It's not a matter of margin of error
I misread your numbers
 
thats besides the point. are you suggesting the 10x increase is margin of error?
 
The test itself is unreliable.
 
There's no baseline to measure error from
Kevin's test proves that
 
I misread your numbers
kevins results are all at 1 second mark
besides the first
there clearly is
 
10:15 PM
why was the first different?
 
but the code is identical, even for the first
so why is it different?
 
how could it have possibly ran so much faster the first time?
 
oh my god.
run it again
 
@Tobiq "SyntaxError: expected expression, got end of script"
 
3: 317ms
2: 3539.999755859375ms
1: 3590.000244140625ms
0: 3990ms
 
10:16 PM
1 message moved to Trash can
@Tobiq Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq. For posting large code blocks, use a paste site like gist.github.com, hastebin.com, pastie.org or a demo site like jsbin.com
 
caprica u suk
 
3: 412.139ms
2: 1086.929ms
1: 1106.154ms
0: 1087.346ms
 
You're missing the point
 
I just saw the most ridiculous scene in 'Better Call Saul' where the female lawyer gets in her car, steps on the gas and talks for nearly 10 seconds on the phone before realizing her car isn't moving but just spinning the wheels in the dirt.
 
No matter how much you "warm up the engine" it takes 10x longer
stop going on ridiculous tangents
 
10:17 PM
Oh good
 
@Tobiq we're not. Read the answers you're given.
 
Someone kicked him before I responded.
 
All of those benchmarks are meaningless for the same reason: you cannot microbenchmark that small piece of code in an optimizing VM.
 
@Tobiq stop doing premature optimizations. When you have a real problem, present it.
 
why kick?
@Kevin, it's not at all premature optimisation... I dont know why you've assumed it is. I have a fully functional application and have narrowed down my bottle neck. When I create classes using alphabetical characters, the program speeds up, because I'm creating a large amounts of objects, constantly. I've presented you with a perfectly logical problem.
 
10:23 PM
@Tobiq I've noticed that you very often don't give a large enough picture to get effective help.
 
does it speed up enough? also ^^
 
Then people tell you things you already know or that are irrelevant to your specific case
 
@ssube The whole notion of "margin of error" or "warming up the engine" is false, because no matter how long, or which order the tests are run, you get the same results. assigning characters is much faster than integers
 
Then you get frustrated
Then you get kicked
Take the time to give us the fuller picture of your problems, and you'll get more relevant answers.
Until then, you're just going to get frustrated (and kicked) over and over again, and it's a waste of your time and ours.
 
So, does anyone know how to combat / work around the problem. Excluding assigning all my keys using ".x" like Kevin
 
10:26 PM
What is your hypothesis? What do you think the problem is?
 
even the string "0" is slower than its string counterpart, "x"
 
Instead of these test cases that really don't say much
 
ive explained the well-founded problem
 
@Cerbrus His claim is that alphabetical keys are faster than numeric ones.
 
that ["0"] and ["a"] would really perform different seems odd.
 
10:27 PM
@Luggage Not that odd
I can totally see V8 making that optimization
 
I can see numeric indexes falling out to something array-like
but until we have a real benchmark, there's no way to tell
 
but numeric as a string?
 
Define real benchmark
 
@Luggage There are no number keys in JavaScript
 
thats very ambiguous
 
10:28 PM
They all undergo toString anyway
 
Benji's the authority on the optimizations' front though. And he isn't here at the moment.
 
Characters seem to be slower, actually...
 
so when you use a number there is another step. I find that more intuitive that [0] would be different for that reason
 
i would argue there must be some other thing you can change in your code to boost performance rather than that in particular. such as not creating a large number of objects constantly.
 
10:28 PM
@Cerbrus that test doesn't test much, though
 
as you can see, its still slower....
 
not only are you adding new keys in some cases and not others
 
is that enough of a benchmark now?
 
3: 147783.674ms
2: 145766.668ms
1: 118057.328ms
0: 118309.081ms
 
each of those functions needs to be optimized on its own
 
10:29 PM
@Cerbrus No, characters are faster in your test.
 
they should share a few functions
 
You're iterating the array backwards
 
^
 
Oh, derp
 
I have done all the necessary testing
 
10:29 PM
Who writes loops backwards -.-
 
and people keep asking me irrelevant stuf
I'm trying to find out how to get around the problem, that very much exists.
 
@Tobiq do you have the assembly output of your test cases?
 
@Tobiq I already explained to you why that is.
 
you go hostile early and others have been trained to react.
 
do you know what optimizations happened?
you have a tiny fraction of the necessary information and resort to personal attacks, rather than explaining
 
10:30 PM
I see that you came in with a real problem, but I also understand the reception you got.
 
We don't own crystal balls. If you don't share your attempts and research, we won't magically know you've done any, and what your findings were
 
@Tobiq Exists in your tests or in a real scenario?
 
what personal attacks?
@Cerbrus what?
@Cerbrus oh yeas, i explained earlier it slows down my program
 
what profile result lead you to think that?
 
i don't see a way around switching to alpha keys
 
10:31 PM
What are you even doing that this is a significant slowdown?
 
@Tobiq approaching from a different angle: What's the case for numeric keys on an object that isn't an array?
 
@Cerbrus allocating new objects, the cheapest of all operations
 
some tight loop where he mutates an object with an integer key, i assume
 
Exactly....
What on earth needs that much allocations?
 
the object has prototype functions. I would love to be able to use array.
 
10:32 PM
@Tobiq Why not an internal array?
 
Those allocations aren't a problem if you have a pool/arena to work from.
 
this.arr[0] or some such?
Also that ^^
 
because I want the object to be interchangeable
with real array
 
is jsperf still... useable?
 
do you need a prototype or is copying the props from a prototype onto an array good enough?
 
10:33 PM
this has certainly been tested there before
 
OK, now's the time when you tell us what you're doing, because a few alarm bells rang after the last few messages you posted
 
its vectors
 
with a real example!
not a benchmark
 
theyre used extensively in program
heres an example..
 
Particle physics....
 
10:35 PM
that is not an example of your code
 
1 min ago, by Luggage
do you need a prototype or is copying the props from a prototype onto an array good enough?
 
I dont understand that.
Could you elaborate, or show example
 
vector = Object.assign([], MyVector.prototype)
 
@Tobiq And a vector needs to be interchangeable with an array?
How?
 
Post an example of your code.
 
10:36 PM
he wants to use it with .0, .1, .2, etc
 
doCalculation(vec2)
doCalculation([1, 2])
 
@Luggage That would probably be orders of magnitude slower than what he's doing
 
his issue is with mutating, creation may happen less often
 
Accepting both types is the root of the problem.
 
im also creating, alot.
 
10:37 PM
ok, then :)
 
because my functions are mutative, so I have a copy method.
 
You're not running collision between every possible combination of particles, are you?
 
vector.copy().add(otherVector)
leaves vector unnaffected
@Cerbrus again, thats irrelevant.
 
rather than giving us your code line by line, post a complete example
 
yea, i see.
 
10:38 PM
do you think rendering 20,000 particles would run if I was checking every particle with every other?
 
@Tobiq Serious question: Why are you doing this in plain JS and not in WebGL or even OpenGL?
 
Another irrelvant question thats again false.
I'm using webgl
 
@Tobiq How should we know? We haven't got the faintest clue what your code looks like
1 min ago, by ssube
rather than giving us your code line by line, post a complete example
 
do you think canvas.arc can paint 20k circles in 16 ms?
 
Post. Your. Code.
 
10:39 PM
and webgl can not run the logic, only painting
and when I did ask about trying to parralelise my code inside webgl, i was told it was stupid...
 
interface Vector extends ArrayLike {
    Vector copy();
    Vector add(value: number[] | Vector);
}

Vector doCalculation(input: number[] | Vector) {}
 
@Luggage [number, number]
 
That's what he wants. To be able to have an array-like (object with number keys) and also use array literals for literal values in code
 
^
I'm not using typescript
 
@Luggage If anything, object literals would be a better choice.
 
10:41 PM
yea, i just used TS to show intent.
 
They tend to spit out a simpler object than allocating a whole new array will.
 
@Tobiq would doCalculation({x: 1, y: 2}) be an acceptable compromise?
 
I've already considered that...
I came here to ask if i needed to refactor my application
or simply find a work around
 
We don't know because you won't post your code.
 
10:42 PM
what code do you want
 
...
 
I see the lure of being able to throw around [ 0, 0, 0 ] instead of new Vector(0, 0, 0) or { 0: 0, 1: 0, 2: 0 }
 
4 mins ago, by ssube
rather than giving us your code line by line, post a complete example
 
@Tobiq Before you ask anything else or call another answer irrelevant, post a minimal, complete, verifiable example.
5
 
@Tobiq Do you know if other JS engines are the same? Will you run this on other engines?
 
10:44 PM
That's actually a good point ^
 
run what?
function vec2(x, y){
    this[0] = x || 0;
    this[1] = y || 0;
}
 
What does Firefox say about your test?
 
this project.
 
yes it runs in other browsers, even mobile.
 
Hi, everyone, anyone knows the release date of Visual Studio 15.3?
 
10:44 PM
What does Firefox say about your entire project?
 
why does that matter
 
and do they have the same performance 'issue's?
 
@MadaraUchiha what do you mean. The benchmark or the prgoram
 
is it universal or v8-specific, this ["0"] vs ["a"] thing
 
@Tobiq Does it run better on Firefox?
Both
 
10:45 PM
 
lemem check
 
pocket Washington
 
is there a FPS meter in firefox, like chrome?
 
:38589697 thanks for your reply, I meant when is the RTM release date
 
10:45 PM
@Tobiq Should be
But run your test first
Easier to see numbers
 
the benchmark?
 
@Shimmy: I'm sure google knows if the date is known
 
Oooooh boy.
 
@Trasiva meant the RTM version, sorry for not pointing that out
guys you bet i tried searching before popping in
 
10:46 PM
It doesn't mean much by itself
 
Just finished white bear ep @BenFortune
 
But it does when compared against another runtime
 
@Shimmy Then maybe the date isn 't known (yet)
 
@KamilSolecki Super messed up, one of my favourites
 
my 4k monitor will be here tomorrow.
can't wait.
 
10:47 PM
@Luggage Sure you can.
 
ok.
 
shoulda paid $5.99 for that same day shipping
 
@Cerbrus that's what i was afraid, so i came here to check if someone has better knowledge
 
@Luggage So you can look at cats in super HD :D
 
10:47 PM
@BenFortune messed up af, but I'm still thinking wether I agree or not.
With the idea
 
s/cats/code/
 
Splitscreen :D
 
Right, I'm off to bed, cya tomorrow fellas
 
o/
 
10:48 PM
\o
 
o/
 
Rhubarb
 
Lemon stop trying to be different duh
 
I'm being the nice one.
 
@Cerbrus ever tried an ultrawide? Such splitting.
 
10:49 PM
he's used to reading hebrew
 
Only SStube can raise that hand.
 
come on, think about it
 
i was close to going ultra-wide
 
Nah, I've just got 3 monitors :D
 
but 4k was cheapr.
 
10:50 PM
@KamilSolecki see, this is the problem
 
Well, 2 monitors and an dell XPS's screen
 
@Luggage best choice I've ever made
 
jesus christ
firefox has been running over a minute
 
3 side by side documents <3
 
and keeps showing long-running script popups
 
10:50 PM
@rlemon oh I joined the facts.
 
single ultra-wide?
 
yah
 
yea.. i think that's the future.
curved?
 
I kind of want another above it, but can't justify or arrange that
 
The border between my screens is kinda bugging me.
 
10:51 PM
firefox is much slower, but the stddev is lower
 
nice
 
I had to decrease the run time by a factor of 1000
 
@Tobiq so some of your tests are hitting an optimization in Chrome (or a de-opt)
 
I feel these firefox numbers are barely usable...
 
make sure you try Kevin's test as well, since the results should be nearly identical (but they aren't in Chrome)
 
10:53 PM
I'm getting popup menus that are probably blocking the script thread
 
I had trouble deciding, so I went with a dell 27" 4k. had good reviews, but isn't the fanciest or best looking enclosure.
 
the results are still twice as slow
 
I decided to go with 2x 27" 2K
 
jesus christ firefox is a mess...
how can you voluntarily use this
 
Dell makes decent displays
 
10:54 PM
@Luggage Nice. ~Weren't tempted to go 21:9?~ Derp, just read your earlier message
 
for a long time they were just Samsung panels
 
y u so big js
 
my neck hurts using two monitors, so I'm going single. And maybe occasioanlly open the laptop for a second
 
My last monitor was a 27" 1440p one and was great, besides the weight and heat
 
@monners was tempted and still wonder if it would have been better. was a close call
 
10:55 PM
and occasional glitch in the controller that led to scanning static
 
I use ultrawide, couldn't work without it now.
 
@Luggage tv glasses
no moving your head
 
@rlemon "mixed reality"
 
ultimate resolution
 
I want those new MS glasses
the wall behind my monitor is so much bigger
 
10:55 PM
I had tv glasses when I was like in grade 9,10
 
@ssube hololens?
 
playing video games is fun
 
@VermillionAzure even newer
 
other than that, not so good
 
stop telling me ultra-wide is better. where were you all last night when I ordered?
 
Playing games on my ultrawide
 
tell me I made the right choice, please. :)
 
@MadaraUchiha Are you familiar with WebRTC?
 
10:56 PM
@BenFortune wanna hear the worst news all day?
 
4k is gorgeous. Would make for a great second display :P
 
ohh, I also have that 'spensive microsoft keyboard.
 
@rlemon I'm not sure I do
 
@BenFortune I can't see retina or normal pixels, but I can see Vive pixels and omg it's annoying
 
@BenFortune left my vape in my bosses car :(
 
10:57 PM
the flat one with the fingerprint reader.
 
@Luggage oh, you finally picked one? So, not mechanical?
 
@Luggage Y tho?
 
@monners I do wish I had those last few pixels.
 
@rlemon That's why you have 3 backups
 
my backups are not as good
and I put my last pair of fresh batteries in it
so now I'm building and charging
 
10:57 PM
@ssube I'm considering getting a 4k to sit above my ultrawide
 
@ssube You get used to it
 
@monners I like my macbook keyboard and my mechanical was a bit loud for the office, so.. i went for my first flat desktop keyboard. I don't regret it.
 
My boss gave me his DK2, and my god those pixels stand out
 
@Luggage to each their own. As long as you like using it then it's a win
 
I don't even use the fingerprint reader, but that one can work wired and has chargeable battery
I wouldn't have been caught dead with a flat keyboard in the past.
I used to beat those people up.
 
10:59 PM
@BenFortune yeah, it takes a few minutes. They just stand out at weird times and remind you that you're in a low res simulation.
 

« first day (2489 days earlier)      last day (2457 days later) »