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:
    My grandmother just passed away, she was 95. I might be going to Florida for a week.
  • The Helper The Helper:
    I have a buddy in Florida who has an extra office space for me with a computer so I can do anything so likely I will be going up there wednesday or thursday
  • Ghan Ghan:
    Let me know if there's anything I can do to help.
  • The Helper The Helper:
    thank you Ghan
  • jonas jonas:
    Sorry for your loss
    +1
  • Varine Varine:
    I'm sorry to hear that bro
  • Varine Varine:
    Not to distract but is anyone aware of any software to help visually impaired people interact with their PC?
  • Varine Varine:
    Also what's the best way to ship a PC? Should I just wrap the fuck out of it in the case or put the components in static bags and wrapped up individually?
  • Ghan Ghan:
    The GPU is the biggest danger typically.
  • Ghan Ghan:
    Some of the pre-built vendors use expanding foam to fill in the case and secure the GPU. Otherwise it might be best to remove it and ship it separately.
  • Ghan Ghan:
    Similar if the machine has a large tower CPU cooler installed. Those can experience huge forces and destroy the socket during shipment if they are heavy.
  • Varine Varine:
    So mainly just the heavier things that jut out? I'm planning on pulling out the SSD's too and anything that I don't have well secured. I'll probably be good leaving the motherboard and PSU screwed in there though if I bundle it up?
  • Ghan Ghan:
    Yeah, I'd expect those to be fine. It's mainly the heavy stuff that is also long/tall where dropping the case would cause it to exert a ton of force on the mount. The motherboard will be fine screwed into the board unless the case itself is somehow severely damaged.
  • Varine Varine:
    I have the original packaging for it, so I was going to just put it back in there
  • Varine Varine:
    I don't think I have the boxes for the components though and so I don't want to have a bunch of loose shit bouncing around
  • The Helper The Helper:
    damn I just read that lol
  • The Helper The Helper:
    when i read up and saw spray in foam I was like oh shit
  • The Helper The Helper:
    going to do the last controller giveaway in the NUON Dome forum because I just cannot sell them since I got them for free from a deceased NUON Legend. It is my last one from that.

    Members online

    No members online now.

    Affiliates

    Hive Workshop NUON Dome
    Top