Cycle burn right?

The arrayEles contains 1500 elements
The Orders contains 1700 elements

The following codes consume 6245108 cycles at a time,right?
The main code for cycle consumption is orders.get(id),why does HashMap consume so many cycles

var orders : HashMap.HashMap<Text,Info> = HashMap.fromIter<Text,Info>(init.vals(),0, Text.equal, Text.hash);

        for ( (id) in arrayEles.vals()){
          
            switch(orders.get(id)){
                case(?v){
                    switch(v.side){
                        case(#1){ ; };
                        case(#2){ ; };
                    };
                };
                case(_){}
            };
        };

If you want some insight into what is going on you can look at these base libraries. A lot of recursions are going on.

Maybe your ids are hashing to the same key? get doesn’t really do anything heavy—unless it has to traverse through a big AssocList within a bucket.

Using the Rust implementation, the consumed cycle is one of the 3.5 branches consumed by MOTOKO