If you had posted this in "For Beginners" I would have responded very differently, but in "general programming" coupled with a statement that you are a professional...
This is 2015. C++ has been standardized for nearly two decades.
Unless you are a professional programmer working in an atypical environment, "STL" is not what what you use. It is the "c++ standard library", or "the standard libraries".
STL typically either meant HP's libraries or SGI's libraries primarily used in-house. Hence, SGI's standard libraries were standard at SGI, HP's standard libraries were standard at HP, and neither were standard in the early days of C++. Both had parts of their libraries incorporated to the C++ standard library in the early 1990s. A lot of hard work went into standardizing the language in the mid 1990s, and in 1998 the c++ language was standardized, including a collection of routines called "the c++ standard library". Unfortunately some bad tutorials and books refer to the C++ standard library as "STL". Please don't do that. For two decades we use the C++ Standard Library, not the STL.
Since then the language has gone through five major updates, but those old tutorials and bad websites keep calling the standard library the "STL".
typically use StringStream to convert between primitive data types
Correct names are important.
Please be careful of your words. This is a technical forum and programming languages have precise definitions of terms. Using the wrong words leads to confusion and errors.
The class is often used to perform what is called a lexical cast. That is, to convert between a numeric value and text forms. Such as converting the string "1234" into the integer value 1234, or back again.
Like the form:
stringstream intermediate;
intermediate << str;
intermediate >> number;
In addition to that type of lexical cast, there are other types of casts and conversions.
Integral promotions are conversions that start at bool move up the chain of signed char, unsigned char, short, unsigned short, int, unsigned int, long int, unsigned long int, long long int, and unsigned long long int. Floating point promotions are conversions that move from float to double.
Because these conversions always expand the size and have room to store the underlying data they are done automatically, called implicit conversions.
If you go the other way down the chain, moving from a bigger type to a smaller type, you need to do an explicit conversion, using a cast. There are several explicit conversion casts you can choose between. One is the c-style cast like Nypyren suggested, where the destination type is in parenthesis. (int)myLongLong. There is a similar version that does exactly the same thing in C++: static_cast<int>(myLongLong).
I don't know about you, your company, your project, or your code base. Generally when working with existing code it is good to stay uniform with the existing practice. If you are doing new development you can pick up different practices and patterns.
Again, these are technical forums, and technical language means using the correct terms wherever possible. This includes terms like "STL" versus "Standard Library" and names of the types of conversions and casts.
As written, your post is unclear due to the poor choice of words.
Continuing with your post:
I've heard StringStream can be slow
Be careful about hearing generically that something can be slow. Sometimes things are slow in one context, and fast in another. Sometimes things that used to be fast or were fast on certain systems are slow today. And sometimes things that used to be slow have become extremely fast.
Yes, relative to most other kinds of conversion, using stringstream as a lexical cast is relatively slow. It has a lot of complex parts. It needs memory buffers, and it does many different validations.
However, speed is relative. It may not be slow in your situation.
If you do something only once and it is not in a time critical section, speed is completely irrelevant.
If you do something a large number of times within a time critical section, speed becomes a factor.
If you do something millions of times with a large volume of data, speed becomes a factor.