incubator-giraph-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jakob Homan (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (GIRAPH-87) Simplify boolean expression in BspService::checkpointFrequencyMet
Date Tue, 15 Nov 2011 19:03:51 GMT

    [ https://issues.apache.org/jira/browse/GIRAPH-87?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13150679#comment-13150679
] 

Jakob Homan commented on GIRAPH-87:
-----------------------------------

correct.  This optimization would be to keep the first if statement and then return the result
of evaluating the else if argument directly ({{return (((superstep - ...}})
                
> Simplify boolean expression in BspService::checkpointFrequencyMet
> -----------------------------------------------------------------
>
>                 Key: GIRAPH-87
>                 URL: https://issues.apache.org/jira/browse/GIRAPH-87
>             Project: Giraph
>          Issue Type: Improvement
>            Reporter: Jakob Homan
>              Labels: newbie
>
> {noformat}        if (superstep < firstCheckpoint) {
>             return false;
>         } else if (((superstep - firstCheckpoint) % checkpointFrequency) == 0) {
>             return true;
>         } else {
>             return false;
>         }{noformat}
> can be simplified to just return the result of the else if evaluation.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message