System SimCache (Game Cache without cache's)

Romek

Super Moderator
Reaction score
964
JASS:
//
        local $HANDLE$ def = $DEF$
        set $HANDLE$_val[S2ID(missionKey + "$|#%&" + key)] = def

Could become:
JASS:
        set $HANDLE$_val[S2ID(missionKey + "$|#%&" + key)] = $DEF$


> though I may have someone that will do it for me.
Ok.
 
Reaction score
341
JASS:
//
        local $HANDLE$ def = $DEF$
        set $HANDLE$_val[S2ID(missionKey + "$|#%&" + key)] = def

Could become:
JASS:
        set $HANDLE$_val[S2ID(missionKey + "$|#%&" + key)] = $DEF$

For some reason it doesn't parse the text macro, so I was forced to add the local.

You can try for yourself if you want, maybe theres something wrong with my JassHelper.
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
> I fail to see how handle count would affect this system.

Arrays aren't unlimited in size.
While that may not be a problem for your map, it might just be one on a general purpose system that's supposed to run everywhere, under all conditions.

> this system doesn't even contain H2I

What do you think S2ID is doing?


I see no use for this.
If you feel the need to hash strings, use a gamecache. It's already there and known to work.
It also has no size limits.

And before this goes anywhere other than the usual graveyard, I'd like to see some solid proof that string handles are stable. Preferably very stable.
 

Romek

Super Moderator
Reaction score
964
> While that may not be a problem for your map, it might just be one on a general purpose system that's supposed to run everywhere, under all conditions.
Handle count doesn't affect strings in any way.
Nor do strings affect the handle count.

Then again: "What do you think S2ID is doing?"
Is pretty similar to H2I, except that it's affected by the string count.

And it didn't cross my mind that there wasn't a way to destroy strings. :p
So this system is indeed much less safe than I had thought it was.
 

Vestras

Retired
Reaction score
249
Why would anyone use this? H2I + substraction will always be faster than this, and when speed is not needed, gamecache is, and will always be, surpreme.

So TimerUtils > this @ speed and gamecache > this @ everything else.
 
Reaction score
341
Tested by Artificial using the Benchmark Natives.
Code:
 time taken (microseconds)
Control:
    0.51165 

GC Set:
    3.40705 
SC Set:
    5.22236

GC Get:
    3.43738 
SC Get:
    4.83100

GC Get (not stored):
    2.65753 
SC Get (not stored):
    4.86905

GC Flush:
    3.03719 
SC Flush:
    4.80044
 

Strilanc

Veteran Scripter
Reaction score
42
> Gamecache isn't actually slow, it seems.
Well, I doubt Blizzard would just make it slower for the sake of making it slow.
It's fast enough to be usable, and it's still the safest one out there.

A modified map can inject any values it wants into game cache. Game cache is the *least* safe.

*edit* Yes, the values are injected to all players' cache. Not just the player with the modified map.
 

Romek

Super Moderator
Reaction score
964
> A modified map can inject any values it wants into game cache. Game cache is the *least* safe.
That was never exploited much anyway. And I believe that exploit has been fixed now anyway.
 
Reaction score
341
> A modified map can inject any values it wants into game cache. Game cache is the *least* safe.
That was never exploited much anyway. And I believe that exploit has been fixed now anyway.

I think griffen still did it even after the patch.
 

Jesus4Lyf

Good Idea™
Reaction score
397
So this SimCache is slow anyway, huh? Thought so. It doesn't inline, and has string concatenation overhead.
I think Table-X was actually the same speed as gamecache in the end, and included the full functionality, I believe (except of course storing values between maps).

I don't expect the gamecache exploit to ever be fully fixed, because in theory you can still memory hack the commands in. But since all you store in gamecache is structs anyway, you can't "modify" the values. However, on a spell that perhaps contains how much of an attribute it must remove after a time (maybe after adding it), you could make this point to an invalid struct so it doesn't remove it. So even when gamecache is used with structs, it's insecure. (Why do I hear it said that gamecache is safe?)

(Of course, I don't believe in H2I or gamecache so I never have any stability or security problems. On that note, I also no longer believe in S2ID. :))
 
Reaction score
341
So this SimCache is slow anyway, huh? Thought so. It doesn't inline, and has string concatenation overhead.
I think Table-X was actually the same speed as gamecache in the end, and included the full functionality, I believe.

I don't expect the gamecache exploit to ever be fully fixed, because in theory you can still memory hack the commands in. But since all you store in gamecache is structs anyway, you can't "modify" the values. However, on a spell that perhaps contains how much of an attribute it must remove after a time (maybe after adding it), you could make this point to an invalid struct so it doesn't remove it. So even when gamecache is used with structs, it's insecure. (Why are people saying gamecache is safe, again?)

(Of course, I don't believe in H2I or gamecache so I never have any stability or security problems. On that note, I also no longer believe in S2ID. :))

I'm guessing my older version is as fast.

But theres no real need to work on this anymore.
 

Strilanc

Veteran Scripter
Reaction score
42
> A modified map can inject any values it wants into game cache. Game cache is the *least* safe.
That was never exploited much anyway. And I believe that exploit has been fixed now anyway.

No, the easiest way to use a modified map was fixed. It is still trivial to do if you have any knowledge about how wc3 works under the hood. I could probably write something to do it in an hour, using a man-in-the-middle or something.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/
  • The Helper The Helper:
    I think we need to add something to the bottom of the front page that shows the Headline News forum that has a link to go to the News Forum Index so people can see there is more news. Do you guys see what I am saying, lets say you read all the articles on the front page and you get to the end and it just ends, no kind of link for MOAR!
  • The Helper The Helper:
    Happy Wednesday!
    +1

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top