@Ignore @Test public void simple_StringBuilder_vs_String() { int count = 1000000; long timeStringBuilder; { long before = System.currentTimeMillis(); StringBuilder bld = new StringBuilder(); for (int i = 0; i < count; i++) { bld.delete(0, 100); bld.append("asdf").append('_').append(1); String name = bld.toString(); } long after = System.currentTimeMillis(); timeStringBuilder = after - before; } long timeString; { long before = System.currentTimeMillis(); for (int i = 0; i < count; i++) { String name = "asdf" + '_' + 1; } long after = System.currentTimeMillis(); timeString = after - before; } Assert.assertTrue(timeString < timeStringBuilder); }
@Override public String toString() { return mxToString() + "\n" + treeToString(); }
QueryPlan implements Serializable { @Override public String toString() { return mxToString() + "\n" + treeToString(); } }
QueryPlan implements Serializable { @Override public String toString() { return mxToString() + "\n" + treeToString(); } QueryPlan(CompositeMetadata root,
                     QueryPlanScorer qdf);  QueryPlan(CompositeMetadata root,
                     QueryPlanScorer qdf,
                     Set<CompositeMetadata> filter); private  QueryPlan(QueryPlan source); }
QueryPlan implements Serializable { @Override public String toString() { return mxToString() + "\n" + treeToString(); } QueryPlan(CompositeMetadata root,
                     QueryPlanScorer qdf);  QueryPlan(CompositeMetadata root,
                     QueryPlanScorer qdf,
                     Set<CompositeMetadata> filter); private  QueryPlan(QueryPlan source); int getSize(); QueryPlanData newData(); QueryPlanNode[] getSources(); List<Conjunct> getUnassignedClauses(); QueryPlanData getEdgeData(QueryPlanNode x,
                                     QueryPlanNode y); void setEdgeData(QueryPlanNode x,
                            QueryPlanNode y,
                            QueryPlanData d); QueryPlan deepCopy(); void flip(QueryPlanNode x,
                     QueryPlanNode y); boolean isRelationshipMatchesMetadata(QueryPlanNode from,QueryPlanNode to); boolean isPlanMatchesMetadata(); void connect(QueryPlanNode from,
                        QueryPlanNode to); QueryPlanNode[] getAllNodes(); boolean isDirectedConnected(QueryPlanNode from,
                                       QueryPlanNode to); boolean isUndirectedConnected(QueryPlanNode from,
                                         QueryPlanNode to); QueryPlanNode[] getBreadthFirstNodeOrdering(); String mxToString(); QueryPlanNode getNode(CompositeMetadata md); String treeToString(); StringBuilder treeToString(StringBuilder bld); @Override String toString(); }
QueryPlan implements Serializable { @Override public String toString() { return mxToString() + "\n" + treeToString(); } QueryPlan(CompositeMetadata root,
                     QueryPlanScorer qdf);  QueryPlan(CompositeMetadata root,
                     QueryPlanScorer qdf,
                     Set<CompositeMetadata> filter); private  QueryPlan(QueryPlan source); int getSize(); QueryPlanData newData(); QueryPlanNode[] getSources(); List<Conjunct> getUnassignedClauses(); QueryPlanData getEdgeData(QueryPlanNode x,
                                     QueryPlanNode y); void setEdgeData(QueryPlanNode x,
                            QueryPlanNode y,
                            QueryPlanData d); QueryPlan deepCopy(); void flip(QueryPlanNode x,
                     QueryPlanNode y); boolean isRelationshipMatchesMetadata(QueryPlanNode from,QueryPlanNode to); boolean isPlanMatchesMetadata(); void connect(QueryPlanNode from,
                        QueryPlanNode to); QueryPlanNode[] getAllNodes(); boolean isDirectedConnected(QueryPlanNode from,
                                       QueryPlanNode to); boolean isUndirectedConnected(QueryPlanNode from,
                                         QueryPlanNode to); QueryPlanNode[] getBreadthFirstNodeOrdering(); String mxToString(); QueryPlanNode getNode(CompositeMetadata md); String treeToString(); StringBuilder treeToString(StringBuilder bld); @Override String toString();  }