123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|673|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> Language Tests -> JSE - Optimisationalism 4

Page : 1 2 Next
Prev
Sat, 09 Sep 2023, 15:34
Jayenkai

Optimisationalism 4 - Just Like Before


I've made a new version of the JSE Stress Testing script, which performs a bunch of different tasks, under different conditions, and records mills() times for each of them, generating a nice table at the end.

You can Test it here
> Reveal 🔎


It should take about 2 or 3 minutes to run, at most, I reckon.
Once done, hit ; or ' to save a screenshot, or use whatever native screenshotting method you have access to.

Please post your result as the final bottom-right score, but also try to supply screenshots with results, so I can see what's slowing things down the most on which platforms!
Optimisation may not actually happen any time soon.. This heatwave is killing me!!!

Macbook Air M2
Safari 3.17
Edge 4.507
Firefox 4.249
Opera 3.706

iPad Air 4
Safari 3.323
Edge 3.326
Firefox 3.313
Chrome 3.723

Win11Arm - Running virtually using UTM, which currently has no GPU Acceleration
Edge 21.04
Firefox 16.77
Opera 9.172
Chrome 7.915

-=-=-
''Load, Next List!''
Sat, 09 Sep 2023, 15:59
spinal


-=-=-
Check out my excellent homepage!
Sat, 09 Sep 2023, 16:40
Jayenkai
Everything but the text..
That's kinda interesting...

-=-=-
''Load, Next List!''
Sun, 10 Sep 2023, 02:13
Dan

On Pc, SrWare Iron Version 114.0.5800.0
Sun, 10 Sep 2023, 16:53
HoboBen
Chrome on windows 10
i5 10600K, GTX 1080
Score 10.5



-=-=-
blog | work | code | more code
Sun, 10 Sep 2023, 17:09
Jayenkai

Kuron's chipped in with a Acer Chromebook. MediaTek Kompanio 1380 Octa-Core CPU, 8GB RAM


Honestly, I never thought the text drawing was as bad as it is.. Have spent most of today trying to get it all working a teensy bit faster, but.. Nope! Not havin' it.

I do wonder if this has changed since I started writing JSE, and text-to-canvas has gotten slower inside the browsers themselves.

.. Or has it always been that slow, but everything else I've worked on has gotten faster and faster?
Really, rather interesting.
I'm glad I made this test!

Thanks for all the testing, everyone!

-=-=-
''Load, Next List!''
Sun, 10 Sep 2023, 22:54
Pakz
I think I remember having to start using canvas buffers when adding the text and the icons on my mining game. As with the explosion effects that were faster back in 2020 and go in slow motion now.


This was done on ipad m2. With a radio playing on the background.

Mon, 11 Sep 2023, 18:19
Kuron
Thanks for posting that, Jay!
Tue, 12 Sep 2023, 08:02
Jayenkai
If anyone's feeling bored..
Open the Optimisationalism 4 test (same link)
Run it, and you should get roughly the same results as before.

Then close your browser.
(This is important, as it seems to remember any optimising that the browser does in the background when you switch between the two)

Open the browser, and go here : index_.html
Optimisationalism 4 should still be loaded. Run it now, and let me know THESE results.

I've been doing lots of maths-optimising, variable optimising, array optimising, as well as fixing up the font with better tracing.
Altogether, this should speed a fair amount up, though... Only your tests will let me know for sure!

.. Hoping for Spinal and Dan in particular to try this, as their results were both spectacularly high!

I'm not 100% convinced that the retraced font will give that big of a difference, if I'm honest. I think it's more a case of the way the canvas renders "ANY" font, rather than my lots-of-pixels font that was the issue.

-=-=-
''Load, Next List!''
Tue, 12 Sep 2023, 12:34
spinal
Repeating the first one got this...


Close browser and load the second one got this...


Tech specs
i7 6th gen
15GB RAM
GTX 960
Windows 10 Home 22H2
Chrome Version 116.0.5845.182

-=-=-
Check out my excellent homepage!
Tue, 12 Sep 2023, 12:40
Jayenkai
Cool.. That's almost everything improved.
.. Except Ovals.
.. !?! Why have the Ovals gotten slower? What's with that!?!
Gonna have to check into that. Might be 'cos the engine's drawing more, faster, that the "Area Fill" bit is getting corrupt or something.

-=-=-
''Load, Next List!''
Tue, 12 Sep 2023, 13:49
Pakz
I tested my old Supercars project. Fast enough here. I remember having to use a list of nearby cars for each car to speed things up.

  --v

Tue, 12 Sep 2023, 20:19
HoboBen


Seems like it improved?

-=-=-
blog | work | code | more code
Wed, 13 Sep 2023, 02:10
Jayenkai
Yeah, it's come a long way in just a few days. It's still not perfect, but it is better.
Keep going, Jay.
Squeeeeeeeeze!!!

-=-=-
''Load, Next List!''
Thu, 14 Sep 2023, 13:22
Jayenkai


Not 100% sure I trust this website, now, if I'm honest..

-=-=-
''Load, Next List!''
Thu, 14 Sep 2023, 13:34
Jayenkai


Oh, is that the "preferred" method, is it?
'cos.. You know.. I just tried that and the engine ran about 30% slower..
So, you know.. Stick that idea up your arse.

Oh, and it breaks EVERYTHING in Firefox, too.
Preferred method my arse..

-=-=-
''Load, Next List!''
Thu, 14 Sep 2023, 14:11
Pakz
I was watching a video on yt. I forgot which one. But the coder was using gpt 4 to suggest optimizations for his I think it was retro assembly code. It mostly were useful responses from gpt4.

He just was asking it to suggest it to make certain parts of code to run faster.
Thu, 14 Sep 2023, 14:24
Jayenkai
I have, indeed, been doing that all week
And it's been quite fruitful, too. Having little tips that make me delve into code I hastily scrubbed together a year ago has opened my eyes to all manner of little nips and tucks.

Edge was running a 4.5 score, on Saturday.
The new (v.3ghd) upload is now running at 3.8
It's like squeezing lemons, but without the horrible sour aftertaste.

You (Specifically Pakz!!) should now be able to run this with about 350 lemmings.
> Reveal 🔎

For everyone else, reduce the floors to 5 and the lemmings to about 100.

-=-=-
''Load, Next List!''
Thu, 14 Sep 2023, 14:32
Dan
Lemmings 350
Floors 10
stress 56~81
Fps 36~38
Thu, 14 Sep 2023, 14:42
Jayenkai
That's a pretty good set of values, actually. Cool
Note the lower framerate even though the stress isn't up to 100%.. That's the drawing that's slowing it down. But I think at 350 sprites + 40 lines of various thicknesses + the ovals, that's likely a bit too far!

Note there's a new "AA Fast" command near the top of the script.
This will use crisp images when at 0/90/180/270 degrees, but antialiased images for any other angles. It means you can worry less about how fast the sprites are going to draw, at the risk of losing clarity if there's anything too detailed..

Though, as per usual, this seems to be a per-browser/system thing. Bloody none-standards!!!

If I switch that to AA False, the framerate on my system plummets to more or less what you're getting.
AA Fast is a solid 60fps.

I've yet to properly test it out, elsewhere, but it's nice to have it there!

-=-=-
''Load, Next List!''
Sun, 17 Sep 2023, 10:14
Jayenkai


Today's work has been mostly gradienting..
Refresh until you get to v.3ghf, and the Optimisationalism 4 test should "hopefully" not be any worse off.
Please do let me know if it is.

On top of that, The Gradient Test is now mostly functional.
Gradients work on Rect/Oval/Star/Text commands.
Gradients do not work on Image commands.

Gradients will not run fast, at all, so if you DO choose to use them, maybe limit them to backgrounds and the like, so you aren't overdoing things.

There's a new OutlineText command, which works exactly the same as the Text command, but draws an outline instead of filling in the text. You can use SetWidth to set the width of the outline.

And then there's a very basic lighting setup. Hold the mouse to see that in action.
AmbientLight sets the ambient light, with 0,0,0 being pitch black and 255,255,255 being fully lit, but also 512,512,512 being over-exposed!!

SetBuffer Lighting, then draw lighting to that layer, then SetBuffer FG, and DrawLighting
When drawing to the buffer, anything <128 = darker.. Anything >128 = lighter
It should be useable, though I haven't yet written anything significant with the command set to be sure. I'll do that later. .. maybe!

Oh, and there's a new SetControlMethod command.
It defaults to Gamepad, and by default will trigger the onscreen gamepad whenever the mouse/touch is tapped.
If you'd rather not have onscreen gamepad/mouse/touch, you can "SetControlMethod Mouse" and the onscreen gamepad won't ever interrupt the player.
The onscreen gamepad button that's usually on the top right of the GUI is now M.I.A.

Known issues
1. The "download html5 project" project is all kinds of broken. Needs a LOT of updates to get it back to what the main site's now doing.
2. I don't know WHAT is going on with my mouse co-ordinates.. I need to dig into those.. They're all kinds of screwy in both Graphics Scaling mode 1 and 2.
Grrr.

-=-=-
''Load, Next List!''
Sun, 17 Sep 2023, 12:47
Jayenkai
Poor Quest 2!! 19.2!!

-=-=-
''Load, Next List!''
Sun, 17 Sep 2023, 18:12
Jayenkai
I think the above issues 1+2 are now resolved.
There still seems to be the occasional BackgroundBuffer quirk, though. I need to figure out what's going on there.
Gosh, that's been a busy day of tweaking and breaking and adding and breaking and fixing and tweaking...

-=-=-
''Load, Next List!''
Mon, 18 Sep 2023, 01:06
cyangames
Lenovo Thinkpad T420 I5 2540m , yes from 2012...
12GB DDR3 @ 1333Mhz
Samsung 850 EVO SSD
Intel HD Graphics 3000
Windows 7
Brave Browser




-=-=-
Web / Game Dev, occasionally finishes off coding games also!
Mon, 18 Sep 2023, 01:34
Jayenkai
That's a fun set of numbers to study!
The maths all seems fairly low, whilst the shapes (texts and ovals) are taking longest.
Those are definitely things I need to focus on.

I keep wondering about WebGL, but whenever I look into doing text on there, it's not exactly a "better" situation, and that's putting me off.
Hmmm..

Also, look at the difference between variables and arrays! Yikes!

-=-=-
''Load, Next List!''
Sat, 23 Sep 2023, 14:38
Jayenkai
Worth posting this again, in case anyone else is working on something similar.
All the commands are turned into numerical values, and all those are in switch's.

This..



is SO MUCH slower than...



-=-=-
''Load, Next List!''
Page : 1 2 Next
Prev