System PII - Perfect Item Indexing

Cohadar

master of fugue
JASS:
while (p != null){
    if (p.evaluate()){
       p.execute();
    }
    p = p.next;
}


So when you have one condition on trigger (that returns false) the difference from timer is 4 bytecode instructions.
So yeah they have exactly the same performance, since no performance difference can ever be noticed in any real usage situation.

We already had discussion of real-usage vs testing-only performance in KT2 thread, lets not repeat it here.

Let me be clear: I have no intention of changing any code in order to satisfy peoples silly ideas of optimization.

EDIT:
my bad, not bytecode instructions but machine assembler instructions since it is safe to assume that trigger invocation is written in C++ rather than in jass :p
 

Jesus4Lyf

Good Idea™
*Shrugs* I'm satisfied with that. Just wanted to know and be sure for my own systems. :)

Thanks for posting your findings.

Edit after thought:
JASS:
while (p != null){
    if (p.evaluate()){
       p.execute();
    }
    p = p.next;
}
Wait, what? Why would it execute after every condition? I thought it was more like:
JASS:
bool b = true
while (p != null){
    if (!p.evaluate()){
       b = false;
    }
    p = p.next;
}
if (b){
    t.execute();
}
 

Cohadar

master of fugue
Aye, I am making DDEA. It's not working! :mad:
Attaching is enough for destructables, they are never removed as far as I know.
(also they are mostly preplaced)

indexing as a concept makes sense only when you need to attach to something that might have MUI problems, and the only two handles of that type are unit and item (items are actually special kind of units)

@Jesus4Lyf
you are right. (obviously)
 

Cohadar

master of fugue
*bump*

Someone needs to approve this before it is forever lost in the depths of php.
 

Sevion

The DIY Ninja
Well, this is pretty much PUI for Items, and I always found PUI really handydandy when doing stuff with Units. And since my opinion carry so much weight, I approve of this system.
 
.. Cohadar do you know your PUI broke my system because it overwrote existing struct on the unit?

I might use this for the new CIS library if you make it a module and we call .destroy instead of .release.
Not to mention struct stack must be allowed too.

Why don't you use modules like AutoIndex? It seems nicer and better to implement.
 

Cohadar

master of fugue
.. Cohadar do you know your PUI broke my system because it overwrote existing struct on the unit?
Do you realize your system is broken because PUI is not?

I might use this for the new CIS library if you make it a module and we call .destroy instead of .release.
Not to mention struct stack must be allowed too.
Just don't call anything, it is a better way.
If it was possible I would forbit destroying of PUI structs manually, but vJass does not have that capability.

Struct stack??

Why don't you use modules like AutoIndex? It seems nicer and better to implement.
Because modules cannot be used for properties.

Autoindex does not work the same way as PUI, it gives index to anything and everything so it can avoid complex algorithms.
If it suits you better you should probably use Autoindex.
 
Because the textmacros are almost the same.
JASS:
  if .pii_data[pii] != 0 then
            call .destroy(.pii_data[pii])
        endif


Why would you want to destroy the struct if a struct is already active on the unit? What if I wanted multiple structs on a unit?

For example for a knockback system what if 3 knockbacks are active on a unit? It'll break the existing knockback on the unit before it's even finished.

>Because modules cannot be used for properties

Okay.
 

Jesus4Lyf

Good Idea™
Please. No one wants a knockback system for items. So would you go comment in the correct thread?

Edit: You know I'm not sure that PII is that useful? I think the system should have the ability to make structs for items when they enter the map, automatically (based on filters and stuff). Hmm.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    Have been talking to a childhood friend who is an Artist and is interested in doing some game music. He has a studio in his house. Yes!
  • The Helper The Helper:
    Going to try and get my friend into the homebrew game indie market he is real interested
  • Varine Varine:
    Does reforged require the port forwarding? Is that even still a thing?
  • The Helper The Helper:
    I do not think that is a thing anymore
  • The Helper The Helper:
    Battle.net is different now and I do not think they are using the same network code
  • The Helper The Helper:
    I am sure they are not
  • tom_mai78101 tom_mai78101:
    Lately, news aren't as enticing as they seemed. Or maybe I'm getting old and desensitized.
  • jonas jonas:
    I think news are more serious recently
  • tom_mai78101 tom_mai78101:
    More serious doesn't necessarily mean it's more interesting. :(
  • The Helper The Helper:
    I find that news.google.com has lots of interesting science stuff going on and the Space X stuff with Starship is super cool too
  • The Helper The Helper:
    plus the boring company and physics stuff happening now but I am more into the science now but there is still some crazy news I see out there using Reddit as a news source though and aggregate services like news.google and stuff and put AP in there I always read the news and yes sometimes it is not as interesting as others
  • The Helper The Helper:
    At some point I am going to look at Xenforo and see if it integrates with Hubspot at all. Would love to look at forum under a full marketing account in Hubspot since I have access to that stuff with my current gig
  • Ghan Ghan:
    Kind of surprised it wouldn't have its own forum product offering.
  • Ghan Ghan:
    That said, when Blizzard switched forum software, they went with Discourse, not xenForo.
  • jonas jonas:
    I think news.google shows you personalized news
  • midnight8 midnight8:
    any of the peeps in here run youtube channels? Figure of all the peeps in this forum, got to be some other geeks like me with channels
  • Ghan Ghan:
    I can say I've uploaded a YouTube video.
    +1
  • The Helper The Helper:
    I can say I know someone that uploaded a youtube video :)
  • jonas jonas:
    A friend of mine has a channel where he uploads some of the crazy machines he has built. Like when he plugged an electric motor into a 3d printed gearbox, attached it to his bycicle and then drove 50mph with it.
  • The Helper The Helper:
    You should post a link to his channel in General Discussion I would definitely check it out

    Members online

    Affiliates

    Hive Workshop NUON Dome
    Top