I am trying to figure out which of these two calls are more efficient:Check if listener is registered before calling unregister.if(EventBus.getDefault().isRegistered(this)){     EventBus.getDefault().unregister(this);}Or calling unregister without the check.EventBus.getDefault().unregister(this);Information for context:I am using EventBus 2.4. The underlying implementation of these two methods is as follows:public synchronized boolean isRegistered(Object subscriber) {    return typesBySubscriber.containsKey(subscriber);}public synchronized void unregister(Object subscriber) {    List<Class<?>> subscribedTypes = typesBySubscriber.get(subscriber);    if (subscribedTypes != null) {        for (Class<?> eventType : subscribedTypes) {            unsubscribeByEventType(subscriber, eventType);        }        typesBySubscriber.remove(subscriber);    } else {        Log.w(TAG, Subscriber to unregister was not registered before:  + subscriber.getClass());    }}I ran both codes 1000 times and saw no difference. I am thinking that simply calling unregister() is optimal.
Check if registered then unregister or simply unregister
java;android