1460764538-c212d220-b2bc-4049-a164-9f949770c284

1. Apparatus for facilitating the measurement of the flow of fluid through a cylindrical pipe having a radius of curvature and an interior wall surface, comprising:
a monolithic pipe insert having a longitudinal axis and a first side defining a cylindrical cross-sectional shape with radius of curvature corresponding to the radius of curvature of the cylindrical pipe and extending along an arc of less than 360, said first side terminating at opposed edges, said pipe insert adapted for being affixed to the pipe with the longitudinal axis of the pipe insert substantially parallel to the axis through the pipe and the first side of the pipe insert abutting the interior wall surface of the pipe, and said pipe insert having a second side exposed to the interior of said pipe and defining a constriction in the cross sectional area of the pipe, the second side defining a smoothly tapered shape extending along the longitudinal axis and defined by a leading edge, a trailing edge, and an apex between the leading and trailing edges, wherein the pipe insert at the apex thereof defines a surface extending between the opposed edges and normal to the axis through the pipe, and a bore extending through the pipe insert at the apex and extending in a direction normal to the pipe axis, and wherein the pipe insert abuts the interior wall surface of the pipe along an arc of less than 360 degrees between the opposed edges and defines a reduction in cross sectional area of the pipe of between 40 and 90 percent.
2. The apparatus according to claim 1 wherein the pipe insert at the apex thereof defines a substantially planar surface extending normal to the axis through the pipe.
3. The apparatus according to claim 1 wherein the pipe insert at the apex thereof defines a concave surface extending normal to the axis through the pipe.
4. The apparatus according to claim 1 wherein the pipe insert at the apex thereof defines a convex surface extending normal to the axis through the pipe.
5. A method of measuring the rate of flow of fluid through a pipe, comprising the steps of:
a) providing a metering run of pipe configured for installation into a piping system, said metering run of pipe defined by a section of cylindrical pipe having a longitudinal pipe axis and a pipe interior defining a 360 degree arc with a diameter d, and a radius of curvature r and first and second bores;
b) providing a flow constricting member, said flow constricting member defined by a one-piece member having a longitudinal axis, an outer surface having a radius of curvature substantially equal to r, and an inner surface having a leading edge and a trailing edge and an apex between the leading and trailing edges; and a bore extending through said member normal to the longitudinal axis at said apex, the outer surface of said flow constricting member defining an arc of less than 360 degrees so that said flow constricting member does not extend around the entire 360 degree arc of the pipe interior;
c) installing said flow constricting member into said metering run of pipe by affixing said member to the interior surface of said pipe such that said bore in said member aligns with said first bore through said pipe, and said second bore is positioned spaced apart from said leading edge of said member;
d) installing said metering run of pipe in said piping system;
e) attaching pressure measuring apparatus to the first and second bores in said pipe;
f) causing fluid to flow in said piping system in the direction defined by the leading edge of the member to the trailing edge of the member;
g) measuring the pressure at the first and second bores in said pipe and calculating the rate of fluid flow through said pipe.
6. Apparatus for facilitating the measurement of fluid flow rate, comprising the combination of:
a length of cylindrical pipe having a longitudinal pipe axis and a pipe interior defining an arc of 360 degrees with a radius of curvature and first and second bores extending through the wall of the pipe and into the interior of the pipe;
a monolithic flow constrictor defined by an elongate body having, said flow constrictor having an outer surface with a radius of curvature substantially equal to r, said outer surface terminating at opposed edges of said constrictor so that the arc of the outer surface between the opposed edges is less than 360 degrees, and a smoothly tapered inner surface having a leading edge and a trailing edge and an apex between the leading and trailing edges, and a bore extending through said flow constrictor at said apex, said flow constrictor affixed to the interior surface of the pipe such that said bore in said flow constrictor is aligned with said first bore through said pipe, said second bore is positioned spaced apart from said leading edge of said flow constrictor.
7. The combination according to claim 6 wherein the flow constrictor at the apex thereof defines a surface extending normal to the longitudinal pipe axis.
8. The combination according to claim 6 the length of cylindrical pipe and the flow constrictor are preassembled and retrofitted into an existing piping system.
9. The combination according to claim 8 wherein the existing piping system is in a landfill well field.

The claims below are in addition to those above.
All refrences to claim(s) which appear below refer to the numbering after this setence.

1. A computer-implemented optimization system, comprising:
a specialization component for creating multiple versions of specialized code fragments from an original code fragment, each specialized code fragment suitable for execution in a specified subset of execution environment phases; and
a control component for transferring control at runtime between the specialized code fragments according to observed execution environment phase changes.
2. The system of claim 1, further comprising a phase component for detecting the execution environment phase and sending phase information to the control component to transfer control according to the observed phase.
3. The system of claim 2, wherein the control component dynamically selects a specialized program fragment to execute.
4. The system of claim 1, further comprising a compiler that employs the specialization component to generate an executable program that employs the specialized code fragments.
5. The system of claim 1, wherein the execution environment includes a garbage collector which operates in multiple phases.
6. The system of claim 5, wherein collaboration between the original code fragment and the garbage collector requires the original code fragment to perform read-barrier or write-barrier operations.
7. The system of claim 5, wherein the specialization component replaces a general memory barrier with a specialized memory barrier.
8. The system of claim 1, wherein a specialized code fragment includes a conditional branch to a second specialized code fragment.
9. The system of claim 1, wherein the specialized code fragments are part of a specialized program that includes multiple different operation types for multiple different execution environment phases.
10. The system of claim 1, wherein the specialization component replaces a general operation in a specialized program version with a specialized operation.
11. A computer-implemented method of optimizing an application, comprising:
duplicating general code into multiple code copies based on corresponding execution environment phases;
configuring the copies to use specialized operations in specialized code fragments for use in associated execution environment phases; and
selecting and executing the specialized code fragments based on a detected execution environment phase of a thread.
12. The method of claim 11, further comprising jumping from a specialized path back to the general code in recognition of program points where a thread recognizes a phase change.
13. The method of claim 11, further comprising jumping from one specialized path directly to another specialized path during barrier execution in recognition of program points where a thread recognizes a phase change.
14. The method of claim 11, further comprising analyzing called code for reachability of a real safe point.
15. The method of claim 11, further comprising splitting a basic block of code relative to a safe point in the general code.
16. The method of claim 11, wherein the specialized code fragment includes multiple different barrier types for multiple different garbage collector phases.
17. The method of claim 11, further comprising testing a predicate in the general code to determine an execution phase.
18. The method of claim 11, further comprising dynamically determining during execution of the general code which of the specialized paths to execute.
19. The method of claim 11, further comprising specializing a method into multiple specialized code fragments each having a designated entry point that is callable from the specialized code fragments.
20. A computer-implemented system, comprising:
computer-implemented means for compiling original code into multiple specialized code versions based on execution phases of the original code, the specialized code versions each include different specialized operations in place of general operations;
computer-implemented means for selecting an appropriate specialized code version based on a detected phase of the original code; and
computer-implemented means for executing the selected specialized code version.